파일구조
./docker_ubuntu
./docker_ubuntu/data (빈폴더 : 로컬과 컨테이너 폴더 동기화)
./docker_ubuntu/ubuntu1604 (로컬과 컨테이너 폴더 동기화)
./docker_ubuntu/ubuntu1604/Dockerfile
./docker_ubuntu/ubuntu1804 (로컬과 컨테이너 폴더 동기화)
./docker_ubuntu/ubuntu1804/Dockerfile
./docker_ubuntu/ubuntu2004 (로컬과 컨테이너 폴더 동기화)
./docker_ubuntu/ubuntu2004/Dockerfile
./docker_ubuntu/docker-compose.yml
./docker_ubuntu/ubuntu1604/Dockerfile
FROM ubuntu:16.04
WORKDIR /
./docker_ubuntu/ubuntu1804/Dockerfile
FROM ubuntu:18.04
WORKDIR /
./docker_ubuntu/ubuntu2004/Dockerfile
FROM ubuntu:20.04
WORKDIR /
./docker_ubuntu/docker-compose.yml
version: '2'
services:
ubuntu1604:
hostname: ubuntu1604
container_name: ubuntu1604
build:
context: .
dockerfile: ./ubuntu1604/Dockerfile
stdin_open: true
tty: true
volumes:
- ./ubuntu1604:/ubuntu1604
- ./data:/data
ubuntu1804:
hostname: ubuntu1804
container_name: ubuntu1804
build:
context: .
dockerfile: ./ubuntu1804/Dockerfile
stdin_open: true
tty: true
volumes:
- ./ubuntu1804:/ubuntu1804
- ./data:/data
ubuntu2004:
hostname: ubuntu2004
container_name: ubuntu2004
build:
context: .
dockerfile: ./ubuntu2004/Dockerfile
stdin_open: true
tty: true
volumes:
- ./ubuntu2004:/ubuntu2004
- ./data:/data