I have tried several times to start the Minio server as a service in GitLab CI tu run my tests that need S3 buckets, but all the time I get the error that "Cannot link to a non running container". This is how docker-compose.yaml for Minio Server looks like from the official site:
services:
minio1:
image: minio/minio:RELEASE.2019-03-27T22-35-21Z
volumes:
- data1:/data
ports:
- "9001:9000"
environment:
MINIO_ACCESS_KEY: ***
MINIO_SECRET_KEY: ***
command: server http://minio1/data
Here it tried to start the Minio Server with the Docker in Docker in my gitlab-ci:
stages:
-test
image: my_image
u_tests:
services:
- name: minio/minio:RELEASE.2019-03-27T22-35-21Z
alias: miniotest
- name: docker:stable-dind
command:
- docker run -p 9000:9000 --name minio1 \
-e "MINIO_ACCESS_KEY=key" \
-e "MINIO_SECRET_KEY=key" \
minio/minio server /data
variables:
MINIO_ACCESS_KEY: ***
MINIO_SECRET_KEY: ***
stage: test
script:
- make test
Here I tried to start the server with command (and also with entrypoint) like in docker-compose file, but didn't succeed.
unit_tests:
services:
- name: minio/minio:RELEASE.2019-03-27T22-35-21Z
alias: minio
command: ["server /home/dataminio"]
- minio/minio:latest
entrypoint:["sh", "-c", "minio start"]
variables:
MINIO_ACCESS_KEY: ***
MINIO_SECRET_KEY: ***
What would be a possible configuration in gitlab.ci to start the Minio Server docker as a service so that my main image can access it?