title: Docker-Compose Entrypoint/Command
body: <p>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!</p>
  
  <p>I've tried changing command: for entrypoint: but I get the same issue.</p>
  
  <pre><code>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
  </code></pre>
  
  <p>install.sh</p>
  
  <pre><code>#!/bin/sh
  apt-get update
  apt-get install -y smbclient nano
  </code></pre>