I'm trying add packages (nano) to a container by using my existing docker.compose.yaml file. I can get it to run the script after it deploys but for some reason it keeps looping the script. Is this the intended purpose? TBH i'm pretty new to the whole docker-compose.yaml setup so I've no idea if this is what I'm supposed to be doing!
I've tried changing command: for entrypoint: but I get the same issue.
version: '3.4'
services:
nextcloud:
image: nextcloud
container_name: "nextcloud"
restart: always
ports:
- 8080:80
volumes:
- /dconfig/nextcloud/data:/var/www/html/data
- /dconfig/nextcloud/config:/var/www/html/config
network_mode: "bridge"
environment:
- TZ=Europe/London
- PGID=1000
- PUID=1000
command: /var/www/html/config/install.sh
install.sh
#!/bin/sh
apt-get update
apt-get install -y smbclient nano