I am trying to Build a Ruby On Rails project inside of a Docker Compose. I got it working for the most part but for some reason I am having trouble with docker compose up
when running. It will fail after the build, but then if I rerun the docker compose up
it will succeed with no problem.
Error on compose up
failed to solve: no match for platform in manifest
Basic Docker Compose file
version: '3'
services:
db:
image: postgres:13-alpine
user: postgres
environment:
- POSTGRES_DB=test-db
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_HOST=localhost
healthcheck:
test:
- CMD-SHELL
- pg_isready -d test-db
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:6
ports:
- '0.0.0.0:6379:6379'
healthcheck:
test:
- CMD-SHELL
- redis-cli ping
interval: 10s
timeout: 5s
retries: 5
web-app:
tty: true
platform: linux/x86_64
build:
context: .
args:
- ENVIROMENT=development
entrypoint: 'rails db:setup && rails s'
depends_on:
- db
- redis
My OS: 13.4.1 (22F82) M1 Pro
Docker Version: Docker version 24.0.2, build cb74dfc
Changing platform to linux/amd64
didn’t seem to make a difference either for whatever reason.
Features enabled:
Use Virtualization framework
Use Rosetta for x86/amd64 emulation on Apple Silicon
(Checking or unchecking this doesn’t seem to make a difference)