Building a Container that Loops: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 6: | Line 6: | ||
This is a simple container based on [[Rhel Base Image|rhel7 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. | This is a simple container based on [[Rhel Base Image|rhel7 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 [[Docker_build#The_Build_Context|build context]]. | |||
loop: | |||
<syntaxhighlight lang='bash'> | |||
</syntaxhighlight> | |||
probe: | |||
<syntaxhighlight lang='bash'> | |||
</syntaxhighlight> | |||
Dockerfile: | |||
FROM | |||
COPY loop probe /opt | |||
CMD /opt/loop |
Revision as of 03:21, 18 January 2018
Internal
Overview
This is a simple container based on rhel7 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:
probe:
Dockerfile:
FROM COPY loop probe /opt CMD /opt/loop