Closed earthiverse closed 11 months ago
Can you provide a Dockerfile for this "mockserver". So I can reproduce.
Can you provide a Dockerfile for this "mockserver". So I can reproduce.
I believe this is the one https://github.com/mock-server/mockserver/blob/mockserver-5.15.0/docker/Dockerfile I'm pulling the service from https://hub.docker.com/r/mockserver/mockserver
wait-for-it.sh script uses bash but there is no bash in the base image of https://hub.docker.com/r/sumina46/wait-for-it ... even if you'd commit bash it will fail, because ENTRYPOINT
is not pointing to /usr/local/bin/wait-for-it.sh
, as a temporary workaround you could try to override locally cached copy with this
$ curl -fsSLO https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh
$ docker build -t sumina46/wait-for-it:latest -f Dockerfile.waiter .
# Dockerfile.waiter
FROM alpine
COPY wait-for-it.sh /usr/local/bin/wait-for-it.sh
RUN chmod +x /usr/local/bin/wait-for-it.sh
RUN apk --no-cache add bash
ENTRYPOINT ["/usr/local/bin/wait-for-it.sh"]
So wait a minute, your example isn't working on gitlab.com with "real" runners?
So wait a minute, your example isn't working on gitlab.com with "real" runners?
It works on my GitLab CI without issues. There aren't any errors in the CI logs.
wait-for-it.sh script uses bash but there is no bash in the base image of https://hub.docker.com/r/sumina46/wait-for-it ... even if you'd commit bash it will fail, because
ENTRYPOINT
is not pointing to/usr/local/bin/wait-for-it.sh
, as a temporary workaround you could try to override locally cached copy with this$ curl -fsSLO https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh $ docker build -t sumina46/wait-for-it:latest -f Dockerfile.waiter .
# Dockerfile.waiter FROM alpine COPY wait-for-it.sh /usr/local/bin/wait-for-it.sh RUN chmod +x /usr/local/bin/wait-for-it.sh RUN apk --no-cache add bash ENTRYPOINT ["/usr/local/bin/wait-for-it.sh"]
I don't see any errors when I do it this way, this works, thanks!
@firecow I was unable to find a maintainer of the original docker image, here is a commit caused the issue https://github.com/firecow/gitlab-ci-local/commit/90a3d3bab3ebf9778e32a32a0a31a5705160ba8b perhaps @lisn0 can help?
I also encountered this issue when trying to run the setup on a Macbook using an M1 Pro (w/ Rosetta).
This suggestion fixed the setup and allowed me to use a Docker-in-Docker properly.
Just fixed the Docker image. I sincerely apologize! Should work now. Let me know if you run into any more problems. Thanks for the heads up!
I'm getting this error:
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "mockserver:1080": executable file not found in $PATH: unknown.
Command:
Output:
/Users/earthiverse/Sites/mockserver/.gitlab-ci-local/services-output/testOgsmall/mockserver/mockserver:latest-0.log
Minimal .gitlab-ci.yml illustrating the issue
Expected behavior No errors
Host information macOS Sonoma 14.1.2 (Apple Silicon M1 Pro) gitlab-ci-local 4.45.2