Juan
Juan

Reputation: 19

Running commands on OS terminal after creating ubuntu via webtop

Is there any way to modify this docker-compose file so to be able to make a few commands to be executed after the Ubuntu instance boots up?

version: "2.1"
services:
  webtop:
    image: linuxserver/webtop:ubuntu-mate
    container_name: webtop
    security_opt:
      - seccomp:unconfined #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Spain
      - SUBFOLDER=/ #optional
      - KEYBOARD=en-us-qwerty #optional
      - TITLE=Webtop #optional
    volumes:
      - /path/to/data:/config
      - /var/run/docker.sock:/var/run/docker.sock #optional
    ports:
      - 3000:3000
    devices:
      - /dev/dri:/dev/dri #optional
    shm_size: "1gb" #optional
    restart: unless-stopped

For example, I want apt update and apt upgrade to be executed after Ubuntu boots up.

Upvotes: 1

Views: 208

Answers (0)

Related Questions