summaryrefslogtreecommitdiffstats
path: root/docker/debian
diff options
context:
space:
mode:
authorWesley Coakley <wcoakley@nvidia.com>2021-04-15 02:48:59 +0200
committerWesley Coakley <wcoakley@nvidia.com>2021-04-16 19:05:44 +0200
commit3a33be132996f8477986a2dbbc8839cbbd27ab2a (patch)
tree8f7b7c8eb4d5942a0d9d7fd851efc3983e584a79 /docker/debian
parentMerge pull request #8465 from opensourcerouting/vtysh-scan-snafu (diff)
downloadfrr-3a33be132996f8477986a2dbbc8839cbbd27ab2a.tar.xz
frr-3a33be132996f8477986a2dbbc8839cbbd27ab2a.zip
docker: prefer CMD to ENTRYPOINT
Specifying watchfrr as CMD instead of ENTRYPOINT allows one to easily override this command when starting a docker container. This allows simple, manual testing via (e.g.) bash. With ENTRYPOINT only the container will simply explode with an exit code if watchfrr exits. For instance one could start a shell session in this container via: ``` docker run --name test --rm -i -t <frr-container> bash ``` The default behavior (`docker run <frr-container>` with no command specified) is not changed. Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
Diffstat (limited to 'docker/debian')
-rw-r--r--docker/debian/Dockerfile2
-rwxr-xr-xdocker/debian/docker-start4
2 files changed, 4 insertions, 2 deletions
diff --git a/docker/debian/Dockerfile b/docker/debian/Dockerfile
index 3f830348b..cc9217f10 100644
--- a/docker/debian/Dockerfile
+++ b/docker/debian/Dockerfile
@@ -17,4 +17,4 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
ADD docker-start /usr/sbin/docker-start
-ENTRYPOINT ["/usr/sbin/docker-start"]
+CMD ["/usr/sbin/docker-start"]
diff --git a/docker/debian/docker-start b/docker/debian/docker-start
index 43854ab14..a0f31f5ac 100755
--- a/docker/debian/docker-start
+++ b/docker/debian/docker-start
@@ -7,4 +7,6 @@ set -e
##
chown -R frr:frr /etc/frr
/etc/init.d/frr start
-exec sleep 10000d
+
+# Sleep forever
+exec tail -f /dev/null