Open terrynguyen255 opened 1 year ago
don't you get the same running docker buildx build -f path/to/Dockerfile --cache-from my_server .
?
Thank you for the response @ndeloof
don't you get the same running docker buildx build -f path/to/Dockerfile --cache-from my_server . ?
Yes! Exact symptom.
I also figured out that docker-compose build
works fine on Google Cloud Build but not on Github Action ubuntu-latest
. The followings are their versions. I hope that helps.
Google Cloud Build:
> cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
> docker-compose version
docker-compose version 1.25.0, build unknown
docker-py version: 4.1.0
CPython version: 3.8.10
OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020
> docker compose version
Docker Compose version v2.21.0
> docker version
Client: Docker Engine - Community
Version: 20.10.14
API version: 1.41
Go version: go1.16.15
Git commit: a224086
Built: Thu Mar 24 01:48:02 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.24
API version: 1.41 (minimum version 1.12)
Go version: go1.19.7
Git commit: 5d6db84
Built: Tue Apr 4 18:18:42 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.22
GitCommit: 8165feabfdfe38c65b599c4993d227328c231fca
runc:
Version: 1.1.8
GitCommit: v1.1.8-0-g82f18fe
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Github Action ubuntu-latest
:
> cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
> docker-compose version
docker-compose version 1.29.2, build 5becea4c
docker-py version: 5.0.0
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
> docker compose version
Docker Compose version v2.21.0
> docker version
Client: Docker Engine - Community
Version: 24.0.6
API version: 1.43
Go version: go1.20.7
Git commit: ed223bc
Built: Mon Sep 4 12:31:44 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 24.0.6
API version: 1.43 (minimum version 1.12)
Go version: go1.20.7
Git commit: 1a79695
Built: Mon Sep 4 12:31:44 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.22
GitCommit: 8165feabfdfe38c65b599c4993d227328c231fca
runc:
Version: 1.1.8
GitCommit: v1.1.8-0-g82f18fe
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Hi @ndeloof ,
I have another finding:
docker version 20.10 works.
I uninstall Github Action's docker and reinstall with curl https://releases.rancher.com/install-docker/20.10.sh
Is there any update on this? It kinda breaks all caching with compose and makes moving to v2 impossible.
If you can reproduce this behavior with docker buildx build ...
command, please report to github.com/docker/buildx (which we rely on for the build
command
... and check the docs too: https://docs.docker.com/reference/cli/docker/image/build/#cache-from For that to work with buildx (which became the default as of docker engine 23) the source of the cache-from needs to be built in a particular way
... and check the docs too: https://docs.docker.com/reference/cli/docker/image/build/#cache-from For that to work with buildx (which became the default as of docker engine 23) the source of the cache-from needs to be built in a particular way
Ah, thanks, this helps.
Is there a document describing how to use cache_to
and cache_from
with docker compose? That is, I'm guessing you can use an image that's cached using cache_to
in cache_from
directly, but the linked doc doesn't explain that.
Here's a link: https://docs.docker.com/build/cache/backends/
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description
Built images are not being used when rebuilding images with
docker-compose build
This worked flawlessly inv2.17
but has stopped working inv2.20
.Steps To Reproduce
bash build-image.sh
Compose Version
Docker Environment
Anything else?
No response