Skip to content

Commit

Permalink
Merge pull request #188 from cisagov/improvement/install_skeleton-pyt…
Browse files Browse the repository at this point in the history
…hon-library_directly

Install cisagov/skeleton-python-library directly with `pip`
  • Loading branch information
mcdonnnj authored Feb 21, 2024
2 parents ce1247a + 66032ea commit aa39972
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
20 changes: 1 addition & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,6 @@ RUN apk --update --no-cache --quiet upgrade
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
#
Expand All @@ -79,12 +66,7 @@ WORKDIR ${CISA_HOME}
# 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
RUN pip3 install --no-cache-dir https://github.com/cisagov/skeleton-python-library/archive/v${VERSION}.tar.gz

###
# Prepare to run
Expand Down
4 changes: 1 addition & 3 deletions tests/container_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
ENV_VAR = "ECHO_MESSAGE"
ENV_VAR_VAL = "Hello World from docker compose!"
READY_MESSAGE = "This is a debug message"
SECRET_QUOTE = (
"There are no secrets better kept than the secrets everybody guesses." # nosec
)
SECRET_QUOTE = "Three may keep a secret, if two of them are dead." # nosec
RELEASE_TAG = os.getenv("RELEASE_TAG")
VERSION_FILE = "src/version.txt"

Expand Down

0 comments on commit aa39972

Please sign in to comment.