mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-02 17:36:36 +00:00
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>
This commit is contained in:
parent
861ea6f268
commit
3a33be1329
@ -56,4 +56,4 @@ RUN apk add \
|
||||
--allow-untrusted /pkgs/apk/*/*.apk \
|
||||
&& rm -rf /pkgs
|
||||
COPY docker/alpine/docker-start /usr/lib/frr/docker-start
|
||||
ENTRYPOINT [ "/sbin/tini", "--", "/usr/lib/frr/docker-start" ]
|
||||
CMD [ "/sbin/tini", "--", "/usr/lib/frr/docker-start" ]
|
||||
|
@ -40,4 +40,4 @@ COPY --from=centos-7-builder /rpmbuild/RPMS/ /pkgs/rpm/
|
||||
RUN yum install -y /pkgs/rpm/*/*.rpm \
|
||||
&& rm -rf /pkgs
|
||||
COPY docker/centos-7/docker-start /usr/lib/frr/docker-start
|
||||
ENTRYPOINT [ "/usr/lib/frr/docker-start" ]
|
||||
CMD [ "/usr/lib/frr/docker-start" ]
|
||||
|
@ -41,4 +41,4 @@ COPY --from=centos-8-builder /rpmbuild/RPMS/ /pkgs/rpm/
|
||||
RUN yum install -y /pkgs/rpm/*/*.rpm \
|
||||
&& rm -rf /pkgs
|
||||
COPY docker/centos-8/docker-start /usr/lib/frr/docker-start
|
||||
ENTRYPOINT [ "/usr/lib/frr/docker-start" ]
|
||||
CMD [ "/usr/lib/frr/docker-start" ]
|
||||
|
@ -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"]
|
||||
|
@ -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
|
||||
|
@ -68,4 +68,4 @@ RUN cd ~/frr && \
|
||||
RUN cd ~/frr && make check || true
|
||||
|
||||
COPY docker/ubuntu18-ci/docker-start /usr/sbin/docker-start
|
||||
ENTRYPOINT ["/usr/sbin/docker-start"]
|
||||
CMD ["/usr/sbin/docker-start"]
|
||||
|
@ -71,4 +71,4 @@ RUN cd ~/frr && \
|
||||
RUN cd ~/frr && make check || true
|
||||
|
||||
COPY docker/ubuntu20-ci/docker-start /usr/sbin/docker-start
|
||||
ENTRYPOINT ["/usr/sbin/docker-start"]
|
||||
CMD ["/usr/sbin/docker-start"]
|
||||
|
Loading…
Reference in New Issue
Block a user