Dang, what on earth has happened to Docker. With no code changes, after updating recently it's not playing havoc for me. Here's my Compose file:
version: '3.9'
services:
# web service (connected to local DB)
web: &web
container_name: web
env_file: .env
deploy:
resources:
limits:
cpus: '2'
memory: 2G
build:
context: .
dockerfile: Dockerfile
command: /bin/sh -c "rm -f /app/tmp/pids/server.pid && gem install bundler -v 2.2.21 && bundle install && rails db:migrate && rails server --port 3000 --binding 0.0.0.0"
ports:
- 3000:3000
- 5432:5432
- 2222:2222
volumes:
- ../:/app:cached
- bundle:/usr/local/bundle
- rails_cache:/app/tmp/cache
- node_modules:/app/node_modules
depends_on:
- db
profiles:
- app
- appnm
# database
db:
container_name: db
image: postgres:14.2
volumes:
- .psqlrc:/root/.psqlrc:ro
- dbdat:/var/lib/postgresql/data
- ./log:/root/log:cached
- ./hlp-db.dump:/hlp-db.dump
environment:
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
ports:
- 5432
healthcheck:
test: pg_isready -U postgres -h 127.0.0.1
interval: 5s
profiles:
- app
- appnm
- db
# database admin
db-admin:
container_name: dbAdmin
image: adminer
ports:
- 1933:8080
depends_on:
- db
profiles:
- app
- appnm
- db
volumes:
web:
bundle:
dbdat:
node_modules:
rails_cache:
And here's my Dockerfile:
FROM ruby:2.7.4
RUN apt-get update -qq && apt-get install -y build-essential
RUN apt-get install -y nodejs
ENV APP_HOME /app
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
EXPOSE 3000
Here's the error:
failed to solve: executor failed running [/bin/sh -c apt-get update -qq && apt-get install -y build-essential]: exit code: 100
And finally here's the command I ran:
docker compose --profile appnm up -d
As I say, this exact setup worked fine before updating Docker recently - the command it's complaining about hasn't changed. Anyone any idea what's up?
MAny thanks in advance.