Skip to content

Commit

Permalink
Merge pull request #12810 from opf/fix/multi-arch-docker-compose
Browse files Browse the repository at this point in the history
install correct gosu for each architecture
  • Loading branch information
cbliard committed Jun 13, 2023
2 parents 40171aa + 6a60c0c commit 4fce978
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docker/prod/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ ENV OPENPROJECT_RAILS__CACHE__STORE=memcache
# Set a default key base, ensure to provide a secure value in production environments!
ENV SECRET_KEY_BASE=OVERWRITE_ME

ARG GOSU_VERSION=1.16
RUN dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
&& chmod +x /usr/local/bin/gosu \
&& gosu nobody true

WORKDIR $APP_PATH

COPY docker/prod/setup ./docker/prod/setup
Expand Down
2 changes: 1 addition & 1 deletion docker/prod/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if [ "$(id -u)" = '0' ]; then
exec "$@"
fi

exec $APP_PATH/docker/prod/gosu $APP_USER "$BASH_SOURCE" "$@"
exec gosu $APP_USER "$BASH_SOURCE" "$@"
fi

exec "$@"
Binary file removed docker/prod/gosu
Binary file not shown.

0 comments on commit 4fce978

Please sign in to comment.