ShadovvBeast / docker-lab

Docker Lab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker-Lab

Docker Lab - Managing docker containers as "labs"

Prerequisites

  • Docker - Docker should be running on the host machine
  • MongoDB - A MongoDB instance is needed, provide a connection string in the config.js file
  • NodeJS & NPM - This is a NodeJS application, with dependencies provided in the package.json file
    • In order to install the bcrypt dependency on a Windows machine, it may be needed to run "npm install --global windows-build-tools" before attempting to install it

Usage

  • Run the application using "npm run start" and wait for it to finish initializing (initializing the db and pulling the required images)
  • Once operational, you can do the following:
    • Get all the labs at http://host:port/labs (defaults to http://127.0.0.1:3000/labs, configurable in the config.js file)
    • Login to get a token via a POST request to http://host:port/login (username and password configurable)
      • The post request should be with Content-Type: "application/json"
      • Formatted like this: {"username": "admin", "password":"Nimad123"}
  • Using the token recived from the login method, you can gain access to the following methods (send the token as a header called "token")

Available labs

  • MySQL
  • Redis
  • Jupyter Notebook

About

Docker Lab


Languages

Language:TypeScript 51.0%Language:JavaScript 49.0%