From 288d27f9f2e1c8a466f3ce3a224245378995eb96 Mon Sep 17 00:00:00 2001 From: Konstantin Demin Date: Sat, 20 Jul 2024 17:12:15 +0300 Subject: [PATCH] misc minor fixes --- Dockerfile | 13 ++++++------- Dockerfile.base | 8 ++++---- Dockerfile.deps | 8 ++++---- scripts/angie-builtin-modules.sh | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index eeb950e..e04e12d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM docker.io/rockdrilla/angie-conv:deps-v1 as deps +FROM docker.io/rockdrilla/angie-conv:deps-v1 AS deps ## --- -FROM deps as certs +FROM deps AS certs SHELL [ "/bin/sh", "-ec" ] COPY /scripts/* /usr/local/sbin/ @@ -20,7 +20,7 @@ RUN pkg='curl' ; \ ## --- -FROM deps as pycache +FROM deps AS pycache SHELL [ "/bin/sh", "-ec" ] COPY /scripts/* /usr/local/sbin/ @@ -136,7 +136,7 @@ RUN install -d -o angie -g angie -m 03777 /angie /run/angie ; \ ln -sv /run/angie/lib /var/lib/angie ; \ ln -sv /run/angie/log /var/log/angie ; \ ## adjust paths in config directory - cd /etc/angie/ ; \ + cd /etc/angie || exit 1 ; \ ln -sv /run/angie run ; \ ln -sv /run/angie/lock lock.d ; \ ln -sv ${ANGIE_MODULES_DIR} modules.dist ; \ @@ -161,7 +161,7 @@ RUN find /etc/angie/ -name .gitkeep -delete ; \ ## preseed builtin modules list RUN x='angie-builtin-modules.sh' ; \ "$x" ; \ - chmod a-x $(which "$x") + chmod a-x "$(which "$x")" ## misc tools RUN apt-install.sh \ @@ -196,8 +196,7 @@ COPY /image-entry.d/ /image-entry.d/ ## misc defaults ENV DUMB_INIT_SETSID=0 \ - MALLOC_ARENA_MAX=4 \ - GOMAXPROCS=4 + MALLOC_ARENA_MAX=4 STOPSIGNAL SIGQUIT diff --git a/Dockerfile.base b/Dockerfile.base index d7d9e3f..c2d7474 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -1,8 +1,8 @@ # FROM docker.io/debian:bookworm-slim as base-upstream ARG PYTHONTAG=3.11.9-slim-bookworm -FROM docker.io/python:${PYTHONTAG} as base-upstream +FROM docker.io/python:${PYTHONTAG} AS base-upstream -FROM base-upstream as base +FROM base-upstream AS base SHELL [ "/bin/sh", "-ec" ] COPY /Dockerfile.base /usr/local/share/ @@ -52,8 +52,8 @@ RUN apt-env.sh apt-get update ; \ ## perl-base: hardlink->symlink RUN d=/usr/bin ; \ - find $d/ -wholename "$d/perl5*" -exec ln -fsv perl {} ';' ; \ - ls -li $d/perl* + find "$d/" -wholename "$d/perl5*" -exec ln -fsv perl {} ';' ; \ + ls -li "$d/perl"* ## remove unwanted binaries RUN set -f ; \ diff --git a/Dockerfile.deps b/Dockerfile.deps index 54f0021..611785d 100644 --- a/Dockerfile.deps +++ b/Dockerfile.deps @@ -1,8 +1,8 @@ -FROM docker.io/rockdrilla/angie-conv:base-v1 as base +FROM docker.io/rockdrilla/angie-conv:base-v1 AS base ## --- -FROM base as setup +FROM base AS setup SHELL [ "/bin/sh", "-ec" ] COPY /scripts/* /usr/local/sbin/ @@ -29,7 +29,7 @@ ENV CIBUILDWHEEL=1 # pyyaml ENV PYYAML_FORCE_CYTHON=1 -RUN w=$(mktemp -d) ; \ +RUN w=$(mktemp -d) ; : "${w:?}" ; \ { apt-mark showauto ; apt-mark showmanual ; } | sort -uV > "$w/t0" ; \ printf '%s\n' ${DEV_PACKAGES} | sort -uV > "$w/t1" ; \ apt-install.sh ${DEV_PACKAGES} ; \ @@ -61,7 +61,7 @@ RUN w=$(mktemp -d) ; \ ## --- -FROM base as deps +FROM base AS deps SHELL [ "/bin/sh", "-ec" ] COPY /Dockerfile.deps /usr/local/share/ diff --git a/scripts/angie-builtin-modules.sh b/scripts/angie-builtin-modules.sh index 7857d87..2302e05 100755 --- a/scripts/angie-builtin-modules.sh +++ b/scripts/angie-builtin-modules.sh @@ -5,7 +5,7 @@ conf_dir='/etc/angie' conf_file="${conf_dir}/.none.conf" pid_file='/run/angie/none.pid' -angie -g "error_log /dev/stderr warn; pid ${pid_file};" -c "${conf_file}" -t +angie -q -e /dev/stderr -g "error_log /dev/stderr warn; pid ${pid_file};" -c "${conf_file}" -t r=$? rm -f "${pid_file}" [ $r -eq 0 ] || exit $r