Open nradosevic opened 11 months ago
Any update on this? This has been reported in other related repos since at least seven months ago.
A band-aid fix for this at the moment is to disable docker buildkit via the environment variable DOCKER_BUILDKIT=0
. This is not a long-term solution as the legacy builder is deprecated and will eventually be removed, but this works if you need to debug.
i.e DOCKER_BUILDKIT=0 docker build .
Description
I'm trying to run docker-compose build of my docker container with --no-cache flag to ignore caches and rebuild everything cause I need to re-run my maven build step.
However, it always use caches no matter what I do.
I tried:
docker system prune -a -f docker builder prune However, it always tries to use caches.
Reproduce
docker system prune -a -f docker builder prune docker build -t --build-arg PLATFORM=linux/amd64 ./ --no-cache
Expected behavior
Caches shouldn't be included, but they are. Even pruning everything doesn't help
docker version
docker info
Diagnostics ID
EDEA4EB9-671E-4711-B6C8-C95EDD776D02/20230815170939
Additional Info
MacOS 12.5
nikola@Nikolas-MacBook-Pro-2 trunk % docker builder prune WARNING! This will remove all dangling build cache. Are you sure you want to continue? [y/N] y ID RECLAIMABLE SIZE LAST ACCESSED m8heul842dm3x8rp8m3tbudhb true 0B 38 seconds ago tf0scd9yisaqp0hz4cr9qfggu true 1.447kB 38 seconds ago q4xjz19cpi6svewufrkyhq2kg true 0B 38 seconds ago s7025dkjknbyfxa22mzzaw632 true 1.855kB 38 seconds ago rdaco35lv54bnt4tpxhyadbvu true 355B 38 seconds ago hteoskb0az82vl4atz2jxc316 true 1.082MB 38 seconds ago dda9gb78osodccckhwy7tc6tb* true 13.93MB 38 seconds ago Total: 15.02MB nikola@Nikolas-MacBook-Pro-2 trunk % docker-compose build news-service --build-arg PLATFORM=linux/amd64 --no-cache [+] Building 2.8s (19/20)
=> [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 1.94kB 0.0s => [internal] load metadata for quay.io/wildfly/wildfly:27.0.1.Final-jdk17 0.9s => https://jdbc.postgresql.org/download/postgresql-42.6.0.jar 1.7s => [internal] load build context 0.1s => => transferring context: 13.96MB 0.1s => CANCELED [ 1/15] FROM quay.io/wildfly/wildfly:27.0.1.Final-jdk17@sha256:8470bc822820e17f7ecb5dc0c02ee9dbe1cdbcc885902253906a682a2d1688de 1.8s => => resolve quay.io/wildfly/wildfly:27.0.1.Final-jdk17@sha256:8470bc822820e17f7ecb5dc0c02ee9dbe1cdbcc885902253906a682a2d1688de 0.0s => => sha256:8470bc822820e17f7ecb5dc0c02ee9dbe1cdbcc885902253906a682a2d1688de 743B / 743B 0.0s => => sha256:a5b4f7f4945b6574db7606dd8175f85a5dd7298b6ffe9cf5c9c19237d76a0efe 1.79kB / 1.79kB 0.0s => => sha256:e8e145a3c6b422ddab5ef5c7a7042c4dec36d5b84c1666cefff20d4d32219347 8.50kB / 8.50kB 0.0s => => sha256:2d473b07cdd5f0912cd6f1a703352c82b512407db6b05b43f2553732b55df3bc 1.05MB / 76.10MB 1.8s => => sha256:50e770a96dde57a5e5a0aa14457724aedca48015617007464fb8d5d08e84cedb 1.05MB / 18.78MB 1.8s => => sha256:c9c96d24fc74f9910704c0fcff09bd6f573c86af6ae88f4e7fdf04efc2e52ffe 5.24MB / 192.44MB 1.8s => CACHED [ 2/15] RUN yum -y install wget 0.0s => CACHED [ 3/15] RUN wget https://downloads.apache.org/maven/maven-3/3.9.3/binaries/apache-maven-3.9.3-bin.tar.gz -P /tmp && tar xf /tmp/apache-maven-3.9.3-bin.tar.gz -C /opt && ln -s /opt/apache-maven-3.9.3 /opt/maven 0.0s => CACHED [ 4/15] ADD https://jdbc.postgresql.org/download/postgresql-42.6.0.jar /tmp/postgresql-42.6.0.jar 0.0s => CACHED [ 5/15] WORKDIR /tmp 0.0s => CACHED [ 6/15] COPY input_files/wildfly-command.sh ./ 0.0s => CACHED [ 7/15] COPY input_files/module-install.cli ./ 0.0s => CACHED [ 8/15] RUN sed -i -e 's/\r$//' ./wildfly-command.sh 0.0s => CACHED [ 9/15] RUN chmod +x ./wildfly-command.sh 0.0s => CACHED [10/15] RUN ./wildfly-command.sh && rm -rf /opt/jboss/wildfly/standalone/configuration/standalone_xml_history/ 0.0s => CACHED [11/15] COPY pom.xml ./ 0.0s => CACHED [12/15] COPY src ./src/ 0.0s => CACHED [13/15] RUN mvn clean package -DskipTests=true -Dmaven.javadoc.skip=true 0.0s => ERROR [14/15] ADD target/cryptonews-2.3.2-debug.war /opt/jboss/wildfly/standalone/deployments/ 0.0s