Skip to content

Commit

Permalink
Merge pull request #2367 from embano1/issue-2366
Browse files Browse the repository at this point in the history
Fix folder write for govc container
  • Loading branch information
Michael Gasch committed Apr 16, 2021
2 parents 7bb9a04 + 6fe8d60 commit bb0307e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Dockerfile.govc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ ENV UID=10001
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "${UID}" \
Expand All @@ -23,9 +22,6 @@ RUN mkdir /temporary-tmp-directory && chmod 777 /temporary-tmp-directory
# Final stage
FROM scratch

# Run all commands as non-root
USER appuser:appuser

# Allow container to use latest TLS certificates
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

Expand All @@ -39,5 +35,11 @@ COPY --chown=appuser --from=build /temporary-tmp-directory /tmp
# Copy application from external build
COPY govc /govc

# Run all commands as non-root
USER appuser:appuser

# session cache, etc
ENV GOVMOMI_HOME=/tmp

# Set CMD to application with container defaults
CMD ["/govc"]

0 comments on commit bb0307e

Please sign in to comment.