This repository was archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add image containing python + vault (#628)
- Loading branch information
1 parent
20a6f3d
commit b93cd35
Showing
3 changed files
with
83 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
FROM docker.io/library/python:3.12 | ||
|
||
ARG VCS_REF=master | ||
ARG BUILD_DATE="" | ||
ARG REGISTRY_PATH=docker.io/paritytech | ||
ARG VAULT_VERSION | ||
|
||
# metadata | ||
LABEL io.parity.image.authors="[email protected]" \ | ||
io.parity.image.vendor="Parity Technologies" \ | ||
io.parity.image.title="${REGISTRY_PATH}/python" \ | ||
io.parity.image.description="python; vault;" \ | ||
io.parity.image.source="https://github.com/paritytech/scripts/blob/${VCS_REF}/\ | ||
dockerfiles/terraform/Dockerfile" \ | ||
io.parity.image.documentation="https://github.com/paritytech/scripts/blob/${VCS_REF}/\ | ||
dockerfiles/terraform/README.md" \ | ||
io.parity.image.revision="${VCS_REF}" \ | ||
io.parity.image.created="${BUILD_DATE}" | ||
|
||
RUN curl "https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip" \ | ||
-o vault.zip; \ | ||
unzip vault.zip -d /usr/local/bin/ vault; \ | ||
rm vault.zip; \ | ||
chmod +x /usr/local/bin/vault | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
docker.io jq \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -Rf /usr/share/doc && rm -Rf /usr/share/man \ | ||
&& apt-get clean | ||
|
||
ARG WORKDIR=/work | ||
RUN groupadd --gid 10001 nonroot && \ | ||
useradd --home-dir /home/nonroot \ | ||
--create-home \ | ||
--shell /bin/bash \ | ||
--gid nonroot \ | ||
--groups nonroot \ | ||
--uid 10000 nonroot | ||
RUN chown -R nonroot. /home/nonroot | ||
RUN mkdir ${WORKDIR} | ||
RUN chown -R nonroot. ${WORKDIR} | ||
USER 10000:10001 | ||
WORKDIR ${WORKDIR} | ||
|
||
USER nonroot:nonroot | ||
CMD ["/bin/bash"] |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
# Image containing Python + Vault |