Created
July 8, 2021 16:45
-
-
Save piksel/2d66c663bb9833285062fe1a573baef8 to your computer and use it in GitHub Desktop.
Change in containers created by docker compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using docker subcommand `compose` | |
$ docker compose up | |
$ docker container inspect kafka -f ' Image: {{ .Image }}{{"\n"}}Config.Image: {{.Config.Image}}' | |
Image: sha256:d694642b6bef4693082bd6192d923f37af9e27ef15beef9de7d93a51d1a5d74d | |
Config.Image: sha256:d694642b6bef4693082bd6192d923f37af9e27ef15beef9de7d93a51d1a5d74d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using standalone `docker-compose` | |
$ docker-compose up | |
$ docker container inspect kafka -f ' Image: {{ .Image }}{{"\n"}}Config.Image: {{.Config.Image}}' | |
Image: sha256:d694642b6bef4693082bd6192d923f37af9e27ef15beef9de7d93a51d1a5d74d | |
Config.Image: bitnami/kafka:latest |
Okay, finally got it working after finding the last paragraph in the docker/compose-cli README
So, the v1.* releases does not include docker compose
. So... what are they? Go-versions of docker-compose
? Nope, they are patched versions of the Docker CLI, adding another version field labeled Cloud integration
...
$ ./docker-linux-amd64 version
Client: Docker Engine - Community
Cloud integration: 1.0.17
But okay, downloading the latest pre-release v2.0.0-beta.6
and moving it into the cli-plugins folder:
$ curl -L -o ~/.docker/cli-plugins/docker-compose --create-dirs \
'https://github.com/docker/compose-cli/releases/download/v2.0.0-beta.6/docker-compose-linux-amd64'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 634 100 634 0 0 3062 0 --:--:-- --:--:-- --:--:-- 3062
100 24.2M 100 24.2M 0 0 17.5M 0 0:00:01 0:00:01 --:--:-- 27.6M
$ docker compose
Usage: docker compose [OPTIONS] COMMAND
...
Finally!
$ docker compose up -d
[+] Running 1/1
⠿ Container dc-test_web_1 Started
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fb0c2a735c38 4cdc5dd7eaad "/docker-entrypoint.…" 18 minutes ago Up 20 seconds 80/tcp dc-test_web_1
No image tag, only ID. Well, at least it's consistent...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sooo, it's apparently in beta?
https://docs.docker.com/compose/cli-command/
Fine, let's install it using this totally non-sketchy script:
https://docs.docker.com/compose/cli-command/#install-on-linux
Okay, now let's see...
Okay, maybe it didn't update the PATH correctly, let's manually run the binary that the script downloads:
(╯°Д°)╯ ︵🐋