yacinelazaar / admin-cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pre-requsistes

Build the custom image

docker build --tag custom-admin-cli:latest .

Run the container in detached mode with the scripts mounted

On Linux

docker run --name admin-cli -v ${PWD}/scripts:/scripts -d custom-admin-cli:latest

On Windows

docker run --name admin-cli -v %cd%/scripts:/scripts -d custom-admin-cli:latest

Execute the script within the container

docker exec admin-cli python /scripts/admin-cli.py

Side notes:

  • When adding extra python dependency through the requirement.txt file make sure to rebuild the image and run a new container:
docker stop admin-cli && docker rm admin-cli 
docker build --tag custom-admin-cli:latest .
docker run -d custom-admin-cli:latest --name=admin-cli -v ./scripts:/scripts

About


Languages

Language:Shell 94.2%Language:Dockerfile 4.3%Language:Python 1.5%