abiosoft / abiosoft/colima

Can't cache layers with docker-compose

Abierto
#1,026 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
30.8k
Forks
613
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Description

On a installation of colima with docker + docker-compose on an m1 mac. It's strange that I can run `docker build .` and the layers will cache... but then when I run `docker-compose build`... the layers don't (and they wipe out any layers cached by the previous call to `docker build`. All of this is done without changing the local files at all.

I also noticed that every time I run docker-compose build, the number of layers is increasing in my colima machine's /var/lib/docker/overlay2. So I'm guessing it just can't find the cached layers and is continuing to create new layers in that folder?

At this point, I honestly can't tell if this is a docker-compose bug or a colima bug... though I never experienced this when I was on Docker Desktop.

here's my docker-compose.yml file:
```
services:
db:
build: { context: ., dockerfile: ./Dockerfile }
container_name: db
env_file: [ .env ]
ports: ["$DB_PORT:$DB_PORT"]
volumes:
- $DB_MOUNT:/opt/prod/db/data
- $DB_CONF_MOUNT:/opt/prod/db/conf/mariadb/server
- $DB_SECRETS_MOUNT:/opt/prod/db/secrets
- $DB_SSL_PUBLIC_MOUNT:/opt/prod/db/conf/mariadb/ssl_public
- $DB_SSL_MOUNT:/opt/prod/db/conf/mariadb/ssl
networks: [ container-network ]
user: "${CONTAINER_UID}:myuser"
logging: { driver: "json-file", options: { max-size: "10m", max-file: "10" } }
security_opt:
- no-new-privileges:true
userns_mode: keep-id:uid=${CONTAINER_UID}

networks:
container-network:
name: my-container-network
```

### Version

colima 0.6.8
docker 26.1.1
docker-compose 2.27.0

### Operating System

- [ ] macOS Intel <= 13 (Ventura)
- [ ] macOS Intel >= 14 (Sonoma)
- [ ] Apple Silicon <= 13 (Ventura)
- [x] Apple Silicon >= 14 (Sonoma)
- [ ] Linux

### Output of `colima status`

```
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0001] socket: unix:///Users/dwu/.colima/default/docker.sock
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.