From 20fbc4a37263bd3f17a2d42f38d8cd470677c0ac Mon Sep 17 00:00:00 2001 From: Tobias dpausp Date: Tue, 24 Oct 2023 17:22:54 +0000 Subject: [PATCH] docker: remove misleading comments, fix gz ending The files must be run through the Flake (script) now. Nixpkgs builds tar.gz, our filename was wrong. --- flake.nix | 4 ++-- nix/docker.nix | 8 +------- nix/docker_static.nix | 7 ------- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/flake.nix b/flake.nix index 4b5d6dcb..c77bf509 100644 --- a/flake.nix +++ b/flake.nix @@ -120,14 +120,14 @@ echo "Tested with VSCode, Pycharm." ''; build_docker_app.exec = '' - out=docker-image-ekklesia-portal.tar + out=docker-image-ekklesia-portal.tar.gz nix build .#docker -o $out echo "Built container image for the application". echo "Load the image with:" echo "docker load -i $out" ''; build_docker_static.exec = '' - out=docker-image-ekklesia-portal-static.tar + out=docker-image-ekklesia-portal-static.tar.gz nix build .#dockerStatic -o $out echo "Built container image for the static files (assets)". echo "Load the image with:" diff --git a/nix/docker.nix b/nix/docker.nix index 280270ea..3cafef0c 100755 --- a/nix/docker.nix +++ b/nix/docker.nix @@ -1,10 +1,3 @@ -#!/usr/bin/env -S nix-build -o docker-image-ekklesia-portal.tar -# Run this file: ./docker.nix -# It creates a docker image archive called docker-image-ekklesia-portal.tar. -# Default tag is the git version. You can set a custom tag with: -# ./docker.nix --argstr tag mytag -# Import into docker with: -# docker load -i docker-image-ekklesia-portal.tar { pkgs, serveApp }: let @@ -17,6 +10,7 @@ in pkgs.dockerTools.buildLayeredImage { name = "ekklesia-portal"; contents = [ passwd ]; + config = { ExposedPorts = { "8080/tcp" = { }; }; User = user; diff --git a/nix/docker_static.nix b/nix/docker_static.nix index b52d3745..586aa46f 100755 --- a/nix/docker_static.nix +++ b/nix/docker_static.nix @@ -1,10 +1,3 @@ -#!/usr/bin/env -S nix-build -o docker-image-ekklesia-portal-static.tar -# Run this file: ./docker_static.nix. -# Default tag is the git version. You can set a custom tag with: -# ./docker_static.nix --argstr tag mytag -# It creates a docker image archive called docker-image-ekklesia-portal-static.tar. -# Import into docker with: -# docker load -i docker-image-ekklesia-portal-static.tar { pkgs, serveStatic }: let