From 4fcaddb2e346384a8f01e1e164a01a0f7c59d232 Mon Sep 17 00:00:00 2001 From: Emil Dabrowski Date: Sat, 3 Dec 2022 22:30:57 +0100 Subject: [PATCH] Fix bug caused by bad permissions and files --- Containerfile | 7 ++++--- container-build.sh | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Containerfile b/Containerfile index 327f846..b2d11b8 100644 --- a/Containerfile +++ b/Containerfile @@ -10,8 +10,9 @@ RUN adduser \ --gecos "" \ --uid 1000 \ hugo -RUN chown hugo:hugo /app -USER hugo -CMD hugo server --bind 0.0.0.0 COPY . /app +RUN chown -R hugo:hugo /app + +USER hugo +CMD hugo server --bind 0.0.0.0 diff --git a/container-build.sh b/container-build.sh index 6f0a8f9..ff498f0 100755 --- a/container-build.sh +++ b/container-build.sh @@ -1,6 +1,6 @@ #!/bin/bash -version="0.2.0" +version="0.2.1" script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) tmp_dir="$(mktemp -d --suffix=-web)" cleanup () { rm -Rfv "$tmp_dir"; } @@ -22,4 +22,6 @@ if [[ "$latest_theme_tag_name" != "$previous_theme_tag_name" ]]; then echo "$latest_theme_release_metadata" >"$release_json" fi +rm -R resources .hugo_build.lock + docker build "$script_dir" -f Containerfile -t jilits/website:latest -t jilits/website:$version -t cr.jilits.se/jilits/website:$version