Skip to content
Snippets Groups Projects
Commit 37dfa964 authored by nimrod's avatar nimrod
Browse files

Sleep container image.

parent 993cd4d4
No related branches found
No related tags found
No related merge requests found
Pipeline #2400 passed
......@@ -100,3 +100,19 @@ push-crond:
needs:
- job: build-crond
artifacts: true
# sleep image:
build-sleep:
extends: .container-build
variables:
CONTEXT: sleep
push-sleep:
extends: .container-push
variables:
CONTEXT: sleep
IMAGE: cron
needs:
- job: build-sleep
artifacts: true
*
!entrypoint
FROM alpine:3.14
COPY --chown=root:root entrypoint /usr/local/bin/entrypoint
USER nobody
ENTRYPOINT ["entrypoint"]
CMD ["sleep", "10"]
HEALTHCHECK CMD true
# Sleep container image
A container image that just sleeps 10 on repeat (will output the sleep command
so you know it's running).
## Usage
For interactive use, specify `-it` so you ctrl+c the container:
```
docker run -it --name sleep registry.shore.co.il/sleep
```
You can also specify a more complex command:
```
docker run -it --name sleep registry.shore.co.il/sleep date '&&' sleep 5
```
#!/bin/sh
while true
do
echo "$@"
eval "$@"
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment