docker básico

Contêiner Alpine Linux RAM: 128MB CPU: 512
sudo docker run --rm -m 128M --cpu-shares 512 -it alpine:3.15 sh
Contêiner MariaDB
sudo docker container run -e MYSQL_ROOT_PASSWORD=admin -e MYSQL_DATABASE=records -e MYSQL_USER=admin -e MYSQL_PASSWORD=root --rm -d mariadb:10.2
Contêiner Mongo DB
sudo docker container run -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=mongouser -e MONGO_INITDB_ROOT_PASSWORD=mongopw --rm -d --name mongodb mongo:5.0.7
Contêiner PostgreSQL
sudo docker container run -e POSTGRES_PASSWORD=root -e POSTGRES_DB=records -p 5432:5432 --rm -dt --name pgsql -v pgdata --network incolumedev postgres:14-alpine
Contêiner Python3.11.0a7
docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp python:3.11.0a7-alpine python your-daemon-or-script.py
Contêiner Python2.7
docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp python:2.7-alpine python your-daemon-or-script.py

Comentários