Skip to content

Commit

Permalink
Update Dockerfile to fix ip binary issue (#71)
Browse files Browse the repository at this point in the history
* Add pipefail command to Dockerfile

* Use slim-buster and install iproute2

* Explicitly use /bin/bash in RUN
  • Loading branch information
CasperWA committed Aug 20, 2021
1 parent ca41f89 commit 071c7af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM python:3.9
FROM python:3.9-slim-buster

RUN echo $(ip route | awk '{print $3}') > /docker_host_ip
RUN apt update && apt install -y iproute2
RUN ["/bin/bash", "-c", "set -o pipefail && ip route | awk '{print $3}' > docker_host_ip"]

COPY helper.py /helper.py

Expand Down

0 comments on commit 071c7af

Please sign in to comment.