Skip to content

Commit

Permalink
Pr fix dockerfile (#10) (#388)
Browse files Browse the repository at this point in the history
* Fix Password Policy for CI (#384)



Fix Dockerfile Run Naming



* Fix Docker Container Naming



---------

Signed-off-by: fkwilken <fkwilken@gmail.com>
  • Loading branch information
fkwilken authored Aug 8, 2023
1 parent b71ded6 commit b5f27e2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 44 deletions.
2 changes: 1 addition & 1 deletion DentOS_Framework/DentOsTestbed/Requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ pytest
pytest-asyncio
pytest-html
pytest-repeat
ixnetwork_restpy
ixnetwork_restpy>=1.1.10
pyvis == 0.1.9
1 change: 0 additions & 1 deletion DentOS_Framework/DentOsTestbedLib/Requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pyyaml
pykwalify
ixnetwork_restpy
2 changes: 1 addition & 1 deletion DentOS_Framework/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ubuntu:jammy
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=US/Pacific

RUN apt-get -o Acquire::Check-Valid-Until=false update
RUN apt-get update
RUN apt-get -y upgrade

# Are those packages used anywhere?
Expand Down
8 changes: 4 additions & 4 deletions DentOS_Framework/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ RUN pip3 install --no-cache-dir pdbpp==0.10.3
WORKDIR /DENT/DentOsTestbed

# Install each time DentOS Framework to use the latest changes from GIT
RUN printf "#!/bin/bash\nDENT_PACKAGES=(\"/DENT/DentOsTestbed\" \"/DENT/DentOsTestbedDiscovery\" \"/DENT/DentOsTestbedLib\")\n" > /entrypoint.sh
RUN printf "pip3 cache purge" >> /entrypoint.sh
RUN printf "[ -z $SKIP_INSTALL ] && for pkg in \${DENT_PACKAGES[@]}; do cd \$pkg; pip3 install --no-cache-dir --root-user-action=ignore .; done" >> /entrypoint.sh
RUN echo "#!/bin/bash\nDENT_PACKAGES=(\"/DENT/DentOsTestbed\" \"/DENT/DentOsTestbedDiscovery\" \"/DENT/DentOsTestbedLib\")\n" > /entrypoint.sh

Check failure on line 23 in DentOS_Framework/Dockerfile.dev

View workflow job for this annotation

GitHub Actions / lint-docker

SC2028 info: echo may not expand escape sequences. Use printf.
RUN echo "pip3 cache purge" >> /entrypoint.sh
RUN echo "[ -z $SKIP_INSTALL ] && for pkg in \${DENT_PACKAGES[@]}; do cd \$pkg; pip3 install --no-cache-dir --root-user-action=ignore .; done" >> /entrypoint.sh
# `pip3 install --editable` does not work for the packages from above
RUN printf "cd /DENT/DentOsTestbed\n\$@\n" >> /entrypoint.sh
RUN echo "cd /DENT/DentOsTestbed\n\$@\n" >> /entrypoint.sh

Check failure on line 27 in DentOS_Framework/Dockerfile.dev

View workflow job for this annotation

GitHub Actions / lint-docker

SC2028 info: echo may not expand escape sequences. Use printf.
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
Expand Down
34 changes: 0 additions & 34 deletions DentOS_Framework/Dockerfile.testing

This file was deleted.

6 changes: 3 additions & 3 deletions DentOS_Framework/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ SCRIPT_DIR=$(dirname "$0")
DOCKERFILE_DIR=$SCRIPT_DIR

# Build base image
docker build -f "$DOCKERFILE_DIR"/Dockerfile -t dent-testing-base:latest .
docker build -f "$DOCKERFILE_DIR"/Dockerfile.base -t dent/test-framework-base:latest .

# Build working image
docker build -f "$DOCKERFILE_DIR"/Dockerfile.testing -t dent-testing:latest .
docker build -f "$DOCKERFILE_DIR"/Dockerfile.auto -t dent/test-framework-dev:latest .

if [ -n "$1" ]; then
COMMAND="$*"
Expand All @@ -23,5 +23,5 @@ docker run \
--mount=type=bind,target=/DENT/DentOsTestbedDiscovery,source="$PWD"/DentOsTestbedDiscovery \
--mount=type=bind,target=/DENT/DentOsTestbedLib,source="$PWD"/DentOsTestbedLib \
--name dent-testing-"$USER" \
dent-testing:latest \
dent/test-framework-dev:latest \
"$COMMAND"

0 comments on commit b5f27e2

Please sign in to comment.