Skip to content

Docker Setup

Spera Alfredo Jeshoua edited this page May 12, 2025 · 7 revisions

Deployment Badge

Overview

A guide to setting up and using VM Lab in a Docker environment.

Note

Approach recommended for the production environment.

Prerequisites

Have installed on your machine:

Ensure Docker is running, and you have the correct permissions to use it (e.g., part of the docker group on Linux).

Steps

  1. Clone the VM Lab main repository to your machine.
git clone https://github.com/isislab-unisa/vm-lab.git
  1. Edit the first_users.yaml file to define initial users.

Caution

Do not include sensitive credentials. Use simple default values and change them later via the system UI.

first_users:
    # Example User 1
    - username: jsmith
      email: [email protected]
      first_name: John
      last_name: Smith
      password: abc
      role: admin
    
    # Example User 2
    - username: rbriggs
      email: [email protected]
      first_name: Rebecca
      last_name: Briggs
      password: def
      role: regular
  1. If needed, edit the template_secrets.toml file to configure the settings of the system. For example:

    • The name of the authentication cookie.
    • The cookie expiry.
    • The VM minimum sharing permissions.
  2. Start the Docker Compose process. This will:

    • Create the PostgreSQL database and volume.
    • Pull the Dockerfile from the SSH module and SFTP module repositories and build them.
    • Build the main app from the Dockerfile of VM Lab.
docker compose up -d

Clone this wiki locally