This repository has been archived by the owner on Aug 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge https://github.com/cisagov/skeleton-docker into lineage/skeleton
- Loading branch information
Showing
9 changed files
with
72 additions
and
133 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
Validating CODEOWNERS rules …
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 |
---|---|---|
|
@@ -4,100 +4,5 @@ FROM coredns/coredns:latest | |
|
||
ARG VERSION | ||
|
||
### | ||
<<<<<<< HEAD | ||
======= | ||
# For a list of pre-defined annotation keys and value types see: | ||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md | ||
# | ||
# Note: Additional labels are added by the build workflow. | ||
### | ||
# [email protected] is a very generic email distribution, and it is | ||
# unlikely that anyone on that distribution is familiar with the | ||
# particulars of your repository. It is therefore *strongly* | ||
# suggested that you use an email address here that is specific to the | ||
# person or group that maintains this repository; for example: | ||
# LABEL org.opencontainers.image.authors="[email protected]" | ||
LABEL org.opencontainers.image.authors="[email protected]" | ||
LABEL org.opencontainers.image.vendor="Cybersecurity and Infrastructure Security Agency" | ||
|
||
### | ||
# Unprivileged user setup variables | ||
### | ||
ARG CISA_UID=421 | ||
ARG CISA_GID=${CISA_UID} | ||
ARG CISA_USER="cisa" | ||
ENV CISA_GROUP=${CISA_USER} | ||
ENV CISA_HOME="/home/${CISA_USER}" | ||
|
||
### | ||
# Upgrade the system | ||
# | ||
# Note that we use apk --no-cache to avoid writing to a local cache. | ||
# This results in a smaller final image, at the cost of slightly | ||
# longer install times. | ||
### | ||
RUN apk --update --no-cache --quiet upgrade | ||
|
||
### | ||
# Create unprivileged user | ||
### | ||
RUN addgroup --system --gid ${CISA_GID} ${CISA_GROUP} \ | ||
&& adduser --system --uid ${CISA_UID} --ingroup ${CISA_GROUP} ${CISA_USER} | ||
|
||
### | ||
# Dependencies | ||
# | ||
# Note that we use apk --no-cache to avoid writing to a local cache. | ||
# This results in a smaller final image, at the cost of slightly | ||
# longer install times. | ||
### | ||
ENV DEPS \ | ||
ca-certificates \ | ||
openssl \ | ||
py-pip | ||
RUN apk --no-cache --quiet add ${DEPS} | ||
|
||
### | ||
# Make sure pip, setuptools, and wheel are the latest versions | ||
# | ||
# Note that we use pip3 --no-cache-dir to avoid writing to a local | ||
# cache. This results in a smaller final image, at the cost of | ||
# slightly longer install times. | ||
### | ||
RUN pip3 install --no-cache-dir --upgrade \ | ||
pip \ | ||
setuptools \ | ||
wheel | ||
|
||
WORKDIR ${CISA_HOME} | ||
|
||
### | ||
# Install Python dependencies | ||
# | ||
# Note that we use pip3 --no-cache-dir to avoid writing to a local | ||
# cache. This results in a smaller final image, at the cost of | ||
# slightly longer install times. | ||
### | ||
RUN wget --output-document sourcecode.tgz \ | ||
https://github.com/cisagov/skeleton-python-library/archive/v${VERSION}.tar.gz \ | ||
&& tar --extract --gzip --file sourcecode.tgz --strip-components=1 \ | ||
&& pip3 install --no-cache-dir --requirement requirements.txt \ | ||
&& ln -snf /run/secrets/quote.txt src/example/data/secret.txt \ | ||
&& rm sourcecode.tgz | ||
|
||
### | ||
>>>>>>> c43af0bbb959f7f3567d8a37cc3a76d2d246c963 | ||
# Prepare to run | ||
### | ||
<<<<<<< HEAD | ||
EXPOSE 53/udp | ||
CMD ["-conf", "/root/Corefile"] | ||
======= | ||
ENV ECHO_MESSAGE="Hello World from Dockerfile" | ||
USER ${CISA_USER}:${CISA_GROUP} | ||
EXPOSE 8080/TCP | ||
VOLUME ["/var/log"] | ||
ENTRYPOINT ["example"] | ||
CMD ["--log-level", "DEBUG"] | ||
>>>>>>> 83baee5da2c5dde558cda41a5cccfefec7c2586c |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--requirement requirements.txt | ||
pre-commit | ||
pytest | ||
pytest-dockerc | ||
python-on-whales |
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
Oops, something went wrong.