Skip to main content

1.6.1.3 Dockge Installation

Assuming you already have installed your Docker VM it is time to install Dockge on top of it to handle all your docker compose files ;)

1. Go to the official dockge page and basically copy the docker compose file that looks like this

services:
  dockge:
    image: louislam/dockge:1
    restart: unless-stopped
    ports:
      - 5001:5001
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./data:/app/data
      # Stacks Directory
      # ⚠️ READ IT CAREFULLY. If you did it wrong, your data could end up writing into a WRONG PATH.
      # ⚠️ 1. FULL path only. No relative path (MUST)
      # ⚠️ 2. Left Stacks Path === Right Stacks Path (MUST)
      - /opt/stacks:/opt/stacks
    environment:
      # Tell Dockge where to find the stacks
      - DOCKGE_STACKS_DIR=/opt/stacks
      # This is great for entering the Docker VM console from the WebGUI
      - DOCKGE_ENABLE_CONSOLE=true

2. Then open your terminal with your access machine and SSH into it. You added the SSH key of your machine in the Cloud Init section so you should be entering without any interruptions. Simply use

ssh username@IP-Address-Docker-VM

3. Once inside we will create a new dockge folder with

mkdir docgke

4. Then we will enter the folder with

cd dockge

5. Inside this folder we will create the docker compose file by copying and pasting in the docker compose content from above

nano compose.yml

6. Then save it with 

CTRL X and hit Y

7. Then we will start the dockge container with

docker compose up -d

8. If everything is green and alright we should be able to access the WebGui at 

IP-Address-DockerVM:5001

9. Then create an account with a username and password. Now, normally I would say you would save the credentials in your Bitwarden account but we have not yet setup that container. However, choose a non typical username and a password of 20 characters and copy paste it somewhere safe s.t you can find it. After we have created a vaultwarden container you will be able to copy paste it inside of it with all your other future credentials.