slimtoolkit / slimtoolkit/slim
GitLab CI Example Does Not Work
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.4k
- Forks
- 840
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behavior
The example in the documentation should work on GitLab CI (shared runners - i.e. gitlab.com runners) and there should be a sample .gitlab-ci.yml file provided somewhere.
Actual Behavior
Take the following .gitlab-ci.yml as an example of a minimal reproducible example:
Example GitLab CI file
---
gitlab_registry:
stage: test
image: docker
needs: []
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ''
script:
- docker pull alpine:3
- docker run -e DOCKER_HOST=tcp://$(grep docker /etc/hosts | cut -f1):2375 dslim/docker-slim --in-container build --http-probe=false --exec 'echo Hey' alpine:3
Running the sample above yields these logs:
Error output:
$ docker run -e DOCKER_HOST=tcp://$(grep docker /etc/hosts | cut -f1):2375 dslim/docker-slim --in-container build --http-probe=false --exec 'echo Hey' alpine:3
Unable to find image 'dslim/docker-slim:latest' locally
latest: Pulling from dslim/docker-slim
cfc0005403f7: Pulling fs layer
cfc0005403f7: Verifying Checksum
cfc0005403f7: Download complete
cfc0005403f7: Pull complete
Digest: sha256:e599698562d9d1c0c7cee4d91eb7fa10750240272828b0201522bf5194a02fa0
Status: Downloaded newer image for dslim/docker-slim:latest
docker-slim: message='join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community'
docker-slim: message='join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS'
docker-slim: message='Github discussions' info='https://github.com/docker-slim/docker-slim/discussions'
cmd=build info=exec message='updating continue-after mode to probe&exec'
cmd=build state=started
cmd=build info=params target='alpine:3' continue.mode='probe&exec' rt.as.user='true' keep.perms='true'
cmd=build state=image.inspection.start
cmd=build info=image id='sha256:d4ff818577bc193b309b355b02ebc9220427090057b54a59e73b79bdfe139b83' size.bytes='5595013' size.human='5.6 MB'
cmd=build info=image.stack name='alpine:3' id='sha256:d4ff818577bc193b309b355b02ebc9220427090057b54a59e73b79bdfe139b83' index='0'
cmd=build state=image.inspection.done
cmd=build state=container.inspection.start
cmd=build info=container name='dockerslimk_1_20210617005916' id='ff629e1c8abd0e235c2a1de89213f1ad109f0c8db10d83075736c17701c3dcca' status='created'
cmd=build info=cmd.startmonitor status='sent'
cmd=build info=event.startmonitor.done status='received'
cmd=build info=container id='ff629e1c8abd0e235c2a1de89213f1ad109f0c8db10d83075736c17701c3dcca' target.port.list='' target.port.info='' message='YOU CAN USE THESE PORTS TO INTERACT WITH THE CONTAINER' name='dockerslimk_1_20210617005916'
cmd=build state=http.probe.error error=no exposed ports message=expose your service port with --expose or disable HTTP probing with --http-probe=false if your containerized application doesnt expose any network services
cmd=build state=exited code=33554435
docker-slim: message='join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community'
docker-slim: message='join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS'
docker-slim: message='Github discussions' info='https://github.com/docker-slim/docker-slim/discussions'
Has anyone managed to get DockerSlim working on GitLab shared runners? If not, can anyone provide a sample of getting it to work with another method?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the minimal .gitlab-ci.yml example on a GitLab shared runner and compare its Docker-in-Docker setup with the documented example. Done means the example works on shared runners and a sample .gitlab-ci.yml is provided in the documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, gitlab
- Domain
- ci-cd, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100