Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Docker Compose

it keeps and reuses the same container unless you remove it with

docker-compose rm
docker-compose up --build

yum install -y net-tools
ifconfig
route -n
ping one
version: '3.7'
services:
  one:
    build:
        context: .
        dockerfile: Dockerfile1
    stdin_open: true
    tty: true
  two:
    image: centos:7
    stdin_open: true
    tty: true
FROM centos:7
RUN yum install -y less vim which net-tools
version: '3.7'
services:
  one:
    image: centos:7
    entrypoint:
        - bash
    stdin_open: true
    tty: true
  two:
    image: centos:7
    stdin_open: true
    tty: true