Skip to content

Commit

Permalink
labs:lab03: Add hosts in /etc/hosts at build time correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
VladNastase authored and Sergiu121 committed Oct 30, 2024
1 parent 2747be0 commit 9b076ff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions labs/03-user/lab-container/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ services:
build:
context: ./openvpn-client1/
dockerfile: ./Dockerfile
extra_hosts:
- "openvpn:10.10.10.50"
cap_add:
- ALL
openvpn-client2:
Expand All @@ -84,6 +86,8 @@ services:
build:
context: ./openvpn-client2/
dockerfile: ./Dockerfile
extra_hosts:
- "openvpn:11.11.11.50"
cap_add:
- ALL
dhcp:
Expand Down
1 change: 0 additions & 1 deletion labs/03-user/lab-container/openvpn-client1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ RUN apt-get install -y net-tools
RUN apt-get install -y openvpn

RUN apt-get -y clean
RUN echo -e '10.10.10.50\topenvpn' > /etc/hosts

RUN rm -rf /var/lib/apt/lists/*

Expand Down
1 change: 0 additions & 1 deletion labs/03-user/lab-container/openvpn-client2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ RUN apt-get install -y net-tools
RUN apt-get install -y openvpn

RUN apt-get -y clean
RUN echo -e '11.11.11.50\topenvpn' > /etc/hosts

RUN rm -rf /var/lib/apt/lists/*

Expand Down

0 comments on commit 9b076ff

Please sign in to comment.