Building a Container that Loops: Difference between revisions
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
=Overview= | =Overview= | ||
This is a simple container based on [[ | This is a simple container based on [[Centos Base Image|centos base image]] whose command sleep-loos, allowing the container to "hang around" without doing much. It also carry a "probe" script that can be exercised externally. | ||
=Procedure= | =Procedure= |
Revision as of 03:28, 18 January 2018
Internal
Overview
This is a simple container based on centos base image whose command sleep-loos, allowing the container to "hang around" without doing much. It also carry a "probe" script that can be exercised externally.
Procedure
Place the scripts (loop and probe) in an empty directory that will serve as build context.
loop:
#!/bin/sh
while true; do sleep 1s; done
probe:
#!/bin/sh
echo "executed in $(uname -n)"
Dockerfile:
FROM COPY loop probe /opt CMD /opt/loop