Loading .gitlab-ci.yml +16 −0 Original line number Diff line number Diff line Loading @@ -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 sleep/.dockerignore 0 → 100644 +2 −0 Original line number Diff line number Diff line * !entrypoint sleep/Dockerfile 0 → 100644 +6 −0 Original line number Diff line number Diff line FROM alpine:3.14 COPY --chown=root:root entrypoint /usr/local/bin/entrypoint USER nobody ENTRYPOINT ["entrypoint"] CMD ["sleep", "10"] HEALTHCHECK CMD true sleep/README.md 0 → 100644 +18 −0 Original line number Diff line number Diff line # 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 ``` sleep/entrypoint 0 → 100755 +7 −0 Original line number Diff line number Diff line #!/bin/sh while true do echo "$@" eval "$@" done Loading
.gitlab-ci.yml +16 −0 Original line number Diff line number Diff line Loading @@ -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
sleep/Dockerfile 0 → 100644 +6 −0 Original line number Diff line number Diff line FROM alpine:3.14 COPY --chown=root:root entrypoint /usr/local/bin/entrypoint USER nobody ENTRYPOINT ["entrypoint"] CMD ["sleep", "10"] HEALTHCHECK CMD true
sleep/README.md 0 → 100644 +18 −0 Original line number Diff line number Diff line # 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 ```
sleep/entrypoint 0 → 100755 +7 −0 Original line number Diff line number Diff line #!/bin/sh while true do echo "$@" eval "$@" done