forked from dentproject/testing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.testing
More file actions
34 lines (27 loc) · 1.51 KB
/
Dockerfile.testing
File metadata and controls
34 lines (27 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM dent-testing-base:latest
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -o Acquire::Check-Valid-Until=false update
RUN apt-get install -y \
vim \
iputils-ping
RUN pip3 install --no-cache-dir pdbpp==0.10.3
# --editable does not work with those packages
# Once it is fixed, we will be able to simplify entrypoint
# RUN --mount=type=bind,target=/DENT/DentOsTestbed,source=DentOsTestbed,rw \
# cd /DENT/DentOsTestbed && pip3 install --editable .
# RUN --mount=type=bind,target=/DENT/DentOsTestbedDiscovery,source=DentOsTestbedDiscovery,rw \
# cd /DENT/DentOsTestbedDiscovery && pip3 install --editable .
# RUN --mount=type=bind,target=/DENT/DentOsTestbedLib,source=DentOsTestbedLib,rw \
# cd /DENT/DentOsTestbedLib && pip3 install --editable .
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
# `pip3 install --editable` does not work for the packages from above
RUN printf "cd /DENT/DentOsTestbed\n\$@\n" >> /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
LABEL author="Anton Putria <anton.putrya@plvision.eu>"
LABEL version="1.0"
LABEL description="DENT env for testing"