Skip to content

Commit

Permalink
Fix folder write for govc container
Browse files Browse the repository at this point in the history
Closes: #2366
Signed-off-by: Michael Gasch <mgasch@vmware.com>
  • Loading branch information
Michael Gasch committed Apr 16, 2021
1 parent be53cbc commit 6fe8d60
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 6fe8d60

Please sign in to comment.