Hey folks,
I am trying to set up the automated backups and have uncommented the lines for the db image to be built as well as the volumes required.
When I run docker-compose I get the below error when building the db image.
I have included my docker-compose file as well.
Any help is appreciated.
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 324B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/mysql:8 2.6s
=> CACHED [1/3] FROM docker.io/library/mysql:8@sha256:c0455ac041844b5e65cd08571387fa5b50ab2a6179557fd938298cab13acf0dd 0.0s
=> => resolve docker.io/library/mysql:8@sha256:c0455ac041844b5e65cd08571387fa5b50ab2a6179557fd938298cab13acf0dd 0.0s
=> ERROR [2/3] RUN apt-get update; 0.4s
------
> [2/3] RUN apt-get update;:
#0 0.296 /bin/sh: apt-get: command not found
------
failed to solve: executor failed running [/bin/sh -c apt-get update;]: exit code: 127
version: '3.7'
services:
server:
image: nginx
restart: always
env_file: env
volumes:
- ./config/nginx/in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro
- ./docker/app/public:/var/www/app/public:ro
depends_on:
- app
ports:
- "8980:80"
networks:
- invoiceninja
app:
image: invoiceninja/invoiceninja:5
env_file: env
restart: always
volumes:
- ./config/hosts:/etc/hosts:ro
- ./docker/app/public:/var/www/app/public:rw,delegated
- ./docker/app/storage:/var/www/app/storage:rw,delegated
- ./config/php/php.ini:/usr/local/etc/php/php.ini
- ./config/php/php-cli.ini:/usr/local/etc/php/php-cli.ini
depends_on:
- db
networks:
- invoiceninja
db:
build:
context: ./config/mysql
ports:
- "3305:3306"
restart: always
env_file: env
volumes:
- ./docker/mysql/data:/var/lib/mysql:rw,delegated
- ./docker/mysql/bak:/backups:rw
- ./config/mysql/backup-script:/etc/cron.daily/daily:ro
- ./config/mysql/backup-script:/etc/cron.weekly/weekly:ro
- ./config/mysql/backup-script:/etc/cron.monthly/monthly:ro
networks:
- invoiceninja
networks:
invoiceninja: