Docker usage guide
Docker Setup Guide
This guide helps you set up Docker and VSCode for development in this repository.
Install Docker Desktop
Download Docker Desktop from official site;
Run installer and follow prompts;
After installation:
Launch Docker Desktop
Enable WSL2 backend (Windows) or VirtioFS (macOS) for better performance.
Install all required extensions:
Docker (ms-azuretools.vscode-docker);
Docker containers (ms-vscode-remote.remote-containers).
Basic usage
If you want to check your files with precommit.sh, launch this commandline:
docker run --rm -v ${PWD}:/app -w /app python:3.13-slim bash -c "bash ./admin_utils/docker/docker.sh && bash ./admin_utils/precommit.sh"
If you want to check your files with spellcheck, launch this commandline:
docker run --rm -v ${PWD}:/app -w /app python:3.13-slim bash -c "bash ./admin_utils/docker/docker.sh && source venv/bin/activate && fiplconfig.check_spelling"
If you encounter the script.sh: line N: $'\r': command not found error
with any bash script, make sure that the file in your VSCode has end-of-line sequence set to LF
instead of CRLF. You can check at the bottom right of the screen or find
Change End of Line Sequence via Comand Palette (Ctrl+Shift+P) with the bash script open.
Advanced usage
After several launches of basic script, you noticed that the dependencies are downloading every time. To download dependencies once and check your code many times, you should create image and use it.
Follow the instructions:
docker build -t advanced-ctlr-admin -f admin_utils/docker/Dockerfile .
After creating own image you can check your code with next docker command:
docker run --rm -v ${PWD}:/app -w /app advanced-ctlr-admin bash -c "bash ./admin_utils/docker/docker.sh && ./admin_utils/precommit.sh"
If any dependencies (especially from Quality Control) are not installed properly, delete created container and virtual environment and rebuild them via the abovementioned commands.
Interactive Development Mode
If you want to develop yourself in interactive mode to fix some problems which are not reproducable on Windows, you can create own image, create container and start it:
docker build -t advanced-ctlr-admin -f admin_utils/docker/Dockerfile .
docker run --name advanced_ctlr -d -v ${PWD}:/app -w /app advanced-ctlr-admin tail -f /dev/null bash
After creating own image for interactive development mode, follow the instructions:
Make sure that you have the Dev Containers extension downloaded;
Open Command Palette (Ctrl+Shift+P);
Select “Remote-Containers: Attach to Running Container”;
Select advanced_ctlr;
Open the folder on the path /app.
Activate your environment
source venv/bin/activate
Now you are ready to develop. Good luck!
If you already have a container and you want to enter it, then first you need to launch it:
docker start advanced_ctlr