Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Syntax3rror404 authored Apr 9, 2024
1 parent c637654 commit 3328817
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ RUN apk add --no-cache python3 libffi curl jq xorriso sshpass \
openssh-client openssh-keygen openssh git && \
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa

# Create non-root user
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
# Create non-root user with specific UID/GID
RUN addgroup -g 65532 appgroup && \
adduser -u 65532 -S appuser -G appgroup -h /home/appuser

# Copy from builder
COPY --from=builder /opt /opt
Expand All @@ -66,12 +67,11 @@ RUN chown -R appuser:appgroup /opt && \
ADD ./entrypoint.sh /tmp/entrypoint.sh
RUN chmod 755 /tmp/entrypoint.sh && chown appuser:appgroup /tmp/entrypoint.sh

USER appuser
USER USER 65532

ENTRYPOINT ["/tmp/entrypoint.sh"]
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D", "-o", "ListenAddress=0.0.0.0"]

ENV PYTHONPATH "${PYTHONPATH}:/opt/venv/bin/python"
ENV PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/opt/terraform:/opt/tf-felper/tfh/bin:/opt/venv/bin" VIRTUAL_ENV="/opt/venv"

0 comments on commit 3328817

Please sign in to comment.