-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a nonroot variant for the kitchen sink image (#277)
Fixes #237
- Loading branch information
Showing
8 changed files
with
148 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,6 +146,31 @@ ENV PATH="/pulumi/bin:${PATH}" | |
# I think it's safe to say if we're using this mega image, we want pulumi | ||
ENTRYPOINT ["pulumi"] | ||
|
||
# Nonroot variant of the image | ||
# | ||
# This sets up a non-root user and uses that user for the image. | ||
######################################################################## | ||
|
||
FROM base AS nonroot | ||
|
||
LABEL "repository"="https://github.com/pulumi/pulumi" | ||
LABEL "homepage"="https://pulumi.com" | ||
LABEL "maintainer"="Pulumi Team <[email protected]>" | ||
LABEL org.opencontainers.image.description="The Pulumi CLI, in a Docker container." | ||
|
||
ARG UID=1000 | ||
ARG GID=1000 | ||
RUN addgroup --gid $GID pulumi && \ | ||
adduser --uid $UID --gid $GID --disabled-password --gecos "" pulumi | ||
USER pulumi:pulumi | ||
# Update env vars for the non-root user | ||
ENV GOPATH=/home/pulumi/go | ||
ENV XDG_CONFIG_HOME=/home/pulumi/.config | ||
ENV XDG_CACHE_HOME=/home/pulumi/.cache | ||
# Re-run the helm setup for the non-root user | ||
RUN helm repo add stable https://charts.helm.sh/stable && \ | ||
helm repo update | ||
|
||
# Pulumi Bridged Terraform Provider Build Environment | ||
# | ||
# Bundles together everything needed to build a Terraform-based | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters