Resource: Docker

Posted on Jul 28, 2022
description: Some docker resources

Links

// set variable
export POSTGRES_PASSWORD='password'

// use it later
docker run -e POSTGRES_PASSWORD -e POSTGRES_USER ...

Logs

  docker logs infrastructure-rabbitmq-1
#   or
  docker logs d3387e01e7cd

List containers

docker ps
# or
docker container ls -a

Remove specific container

docker rm d3387e01e7cd
  • docker stop also works with container id

Get into container shell/terminal

docker exec [container-id or name] [shell - can be bash or ash]