Skip to content

Docker Setup

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

VM Lab Deployment Badge

Overview

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

Note

Approach recommended for the production environment.

Prerequisites

Ensure you have the following 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
  2. Edit the first_users.yaml file to define initial users.

    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

Caution

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

  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:

    docker compose up -d

    This will:

    • Create the PostgreSQL database and volume.
    • Create the database tables from the init-db.sql file.
    • Pull the Dockerfile from the SSH module and SFTP module repositories and build them.
    • Build the main app from the Dockerfile of VM Lab.
  3. The application will be served on the port 8501.

Clone this wiki locally