Skip to content

Latest commit

 

History

History
54 lines (49 loc) · 1.05 KB

README_commands.md

File metadata and controls

54 lines (49 loc) · 1.05 KB

docker_intro

Introduction to Docker

Run images from docker hub

docker run --rm -it ubuntu bin/bash   
docker images 
docker ps
docker ps -a

https://hub.docker.com/_/python

docker pull python
docker run --rm -it python
docker run --rm -it python:3.10.4-slim-bullseye
python3 src/app.py 

Build your docker images

docker build -t my_python_app .
docker run --rm my_python_app
docker run --rm -it my_python_app bash
docker run --rm -v "$(pwd)"/data:/code/data my_python_app
docker run --rm -it -v "$(pwd)"/data:/code/data my_python_app bash

docker-compose

docker-compose build
docker-compose up
docker-compose down

Rename the env_file_sample to .env

docker-compose -f plus-postgres.docker-compose.yml build my_python_app_dc

docker-compose -f plus-postgres.docker-compose.yml up pgdatabase
docker-compose -f plus-postgres.docker-compose.yml up my_python_app_dc
docker-compose -f plus-postgres.docker-compose.yml down