https://hub.docker.com/r/docker/compose/
States to install you do:
docker pull docker/compose
````
The latest tag does not exist so this is incorrect.
km@Karls-MBP ~ $ docker pull docker/compose
Using default tag: latest
Error response from daemon: manifest for docker/compose:latest not found
```
Please refer to the "This image" paragraph on that page:
This image
The
docker/compose
image on DockerHub is designed to be used with therun.sh
script available on the official GitHub repository. You can also refer to the section called "Install as a container" in the installation docs.
I was hoping to use this in my gitlab-ci.yml file.
.dind: &dind
image: docker:latest
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
before_script:
- apk update
- apk upgrade
- apk add python python-dev py-pip build-base
- pip install docker-compose
- docker-compose --version
Test Docker Compose:
<<: *dind
stage: Test
script:
- docker-compose -f docker-compose.test.yml build job1
- docker-compose -f docker-compose.test.yml down
- docker-compose -f docker-compose.test.yml up --remove-orphans --force-recreate --abort-on-container-exit
As you can see I'm currently using the docker:latest
image. I was hoping to replace it with this so I don't need to install docker compose everytime the template is used, but since you need to run a script for this however this probably won't work.
@basickarl You can download https://raw.githubusercontent.com/docker/compose/master/script/run/run.sh and use it in place of the docker-compose
command.
@shin- Yo! If I do as you say it will fail (and did fail) due to the run.sh
file not being available in the docker:latest
image.
.dind: &dind
image: docker:latest
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
Test Docker Compose:
<<: *dind
stage: Test
script:
- run.sh -f docker-compose.test.yml build job1
- run.sh -f docker-compose.test.yml down
- run.sh -f docker-compose.test.yml up --remove-orphans --force-recreate --abort-on-container-exit
Which was expected:
/bin/sh: eval: line 59: run.sh: not found
ERROR: Job failed: exit code 127
Yes, that's why I said you would have to download it. It'll still be faster than installing Python and all the surrounding tooling.
Alright, gotcha now! It was complaining due to docker:latest not running bash. All good and well now, thanks!
Also this should not be referenced to 5747 They are different problems.
docker/compose has no latest
tag, so you must use with exact tag resolution:
$ docker pull docker/compose:1.19.0
1.19.0: Pulling from docker/compose
605ce1bd3f31: Already exists
ed764f565fce: Pull complete
.....
@shin- Can't we simply add a latest
to the image on Docker Hub? That shouldn't be too hard. We use this image with Bitbucket Pipelines, and ...
@shin- I'd like to understand why this project is adamantly opposed to having a latest
tag in favor of using a shell script (run.sh
). As a user who is relatively comfortable with Docker, it is counter-intuitive to download a shell script which contains more-or-less the same options as I would manually pass to docker run
.
Care to enlighten me?
- Specifying an exact version (1.19.0) is crying for recurring maintenance (and potential future security issues).
@bittner sure, it's fair enough
Agree with @bittner , when will it be implemented?
Agree with @bittner as well, when will it be implemented?
Also agree with @bittner , when will it be implemented?
@shin- please, reopen this issue
Most helpful comment
docker/compose has no
latest
tag, so you must use with exact tag resolution: