FROM ubuntu:latest
LABEL MAINTAINER="*******"
RUN apt-get update
RUN apt-get install -y nginx
RUN echo "nginx-container"
WORKDIR /etc/nginx
CMD ["nginx", "-g", "daemon off;"]
EXPOSE 80
본인의 이메일을 넣어서 Dockerfile을 만들어 준다
sudo docker build -t {name}:{version} .
'-t' : tag
'.' : 경로
docker run -p 8080:80 --name {name} -d --rm {name}:{version}
docker login
docker tag {name}:{version} {path}/{name}:{version}
docker push {path}/{name}:{version}
docker rmi {path}/{name}:{version}
docker run -p 8080:80 --name {name} -d --rm {path}/{name}:{version}
services
nginx:
image: {path}/{name}:{version}
ports:
- "8080:80"
docker-compose up -d
docker-compose config
docker-compose down