Skip to content

Instantly share code, notes, and snippets.

@claudioed
Created September 22, 2021 21:17
Show Gist options
  • Save claudioed/3cb8959d9503f1d00eaa084e795367b6 to your computer and use it in GitHub Desktop.
Save claudioed/3cb8959d9503f1d00eaa084e795367b6 to your computer and use it in GitHub Desktop.
Docker Intro
## Operando docker
## Run ubuntu
docker run -t -i --rm ubuntu bash
## Update repositories
apt-get update
## Install maven
apt-get install maven
ls -l
## Run nginx
docker run --name nginx -d -p 80:80 nginx
## Run Postgres
docker run --name postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
##Volumes
docker volume create data
docker volume inspect data
docker volume ls
docker volume rm data
## Criar uma pasta com arquivo index.html, e apontar no root
docker run --name nginx -p 80:80 -v /home/claudio/development/gitlab/kong-upstream-mock/nginx:/usr/share/nginx/html:ro -d nginx
## Redes
docker network ls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment