Skip to content

Commit

Permalink
Merge pull request #35 from EdwinBetanc0urt/bugfix/docker-user-security
Browse files Browse the repository at this point in the history
fix: Docker user security on container.
  • Loading branch information
yamelsenih authored Jun 10, 2024
2 parents 268a3d7 + 89fac82 commit 2325fcb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y pkg-config libssl-dev && rm -rf /var/li
cargo install --config net.git-fetch-with-cli=true --path . && \
mv docker/.env /usr/local/cargo/bin/

FROM debian:bullseye-20240423
FROM debian:bullseye-20240513

ENV \
RUST_LOG="info" \
Expand Down Expand Up @@ -44,4 +44,13 @@ RUN apt-get update && \
echo "Set Timezone..." && \
echo $TZ > /etc/timezone

RUN addgroup adempiere && \
adduser --disabled-password --gecos "" --ingroup adempiere --no-create-home adempiere && \
chown -R adempiere /opt/apps/server/ && \
chmod +x /usr/local/bin/server && \
echo "Set Timezone..." && \
echo $TZ > /etc/timezone

USER adempiere

CMD ["server"]

0 comments on commit 2325fcb

Please sign in to comment.