-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change test dockerfile base to
docker:24.0.4-cli-alpine3.18
rather …
…than copying in, buildx would not work the other way. Signed-off-by: Adam Warner <me@adamwarner.co.uk>
- Loading branch information
Showing
3 changed files
with
14 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
FROM python:3.10-alpine3.18 | ||
FROM docker:24.0.4-cli-alpine3.18 | ||
|
||
# Only works for docker CLIENT (bind mounted socket) | ||
COPY --from=docker:24-cli /usr/local/bin/docker /usr/local/bin/ | ||
|
||
RUN apk add --no-cache \ | ||
curl \ | ||
&& pip3 install --no-cache-dir -U pip pipenv | ||
|
||
COPY ./cmd.sh /usr/local/bin/ | ||
COPY --chmod=0755 ./cmd.sh /usr/local/bin/cmd.sh | ||
COPY --chmod=0755 ./entrypoint.sh /usr/local/bin/entrypoint.sh | ||
COPY Pipfile* /root/ | ||
WORKDIR /root | ||
|
||
RUN pipenv install --system \ | ||
&& sed -i 's|/bin/sh|/bin/bash|g' /usr/local/lib/python3.10/site-packages/testinfra/backend/docker.py | ||
RUN apk add --no-cache \ | ||
python3-dev \ | ||
py3-pip \ | ||
curl \ | ||
&& pip3 install --no-cache-dir -U pip pipenv \ | ||
&& pipenv install --system \ | ||
# Not 100% sure what this line does, but it's always been in the Dockerfile (aside from pointing at a different file) | ||
# Tests fall over without it. Investigate later. | ||
&& sed -i 's|/bin/sh|/bin/bash|g' /usr/lib/python3.11/site-packages/testinfra/backend/docker.py | ||
|
||
RUN echo "set -ex && cmd.sh && \$@" > /usr/local/bin/entrypoint.sh | ||
RUN chmod +x /usr/local/bin/entrypoint.sh | ||
ENTRYPOINT entrypoint.sh | ||
CMD cmd.sh |
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 @@ | ||
set -ex && cmd.sh && \$@ |