사전_42_ft_Server : 2 : DockerFile, Debian OS, Nginx

[Dictionary for FT_SERVER] [1]

What is Dockerfile, Debian OSand Nginx?

도커, 데비안 OS, Nginx는 뭘까?

2020. 12. 25 kkim


목차 Index

[0] Dockerfile
       [0.1] What is Dockerfile? 도커파일이란?
       [0.2] Layer of Dockerfile 도커파일의 구조
[1] Debian OS
[2] Nginx


[0] Dockerfile


 

[0.1] What is Dockerfile? 도커파일이란?

 

Dockher need Image to create & run Container.
Dockerfile create Image as user written.

 

도커는 컨테이너를 생성하고 실행시키기 위해 이미지가 필요합니다.

Dockerfile은 사용자가 작성한 내용에 따라 이미지를 생성하는 역할을 하죠. (like Makefile)


[0.2] Dockerfile의 구조

Let's study about Dockerfile. We will from the start point.

도커파일을 공부해 봅시다. 처음부터 해보자구요!


1st Keyword. FROM

FROM keyword sets the BASE IMAGE. 

To put it simplely, we will input debian:buster here.

FROM 키워드는 기반으로 사용할 이미지를 지정합니다.

쉽게 말하자면, 저희는 여기에 debian:buster를 넣을 것입니다.

FROM		debian:buster

2nd Keyword. LABEL

Add informations like version, writer, comment, ...etc.

버전, 작성자, 코멘트 등 정보를 추가합니다.

LABEL		maintainer="kkim@student.42seoul.kr"

3rd Keyword. RUN

 

Set running code when make new Image layor.

이미지 레이어를 생성할 때 실행할 코드를 지정합니다.

RUN		apt-get update
RUN		apt-get upgrade -y

RUN		apt-get -y install nginx

RUN		apt-get -y install mariadb-server

RUN		apt-get -y install php7.3 php-mysql php-fpm php-cli php-mbstring

RUN		apt-get -y install wget

3rd Keyword. RUN

w

RUN		apt-get update
RUN		apt-get upgrade -y

RUN		apt-get -y install nginx

RUN		apt-get -y install mariadb-server

RUN		apt-get -y install php7.3 php-mysql php-fpm php-cli php-mbstring

RUN		apt-get -y install wget

 

추후에 더 추가하겠습니다.

 

 

도커 시작하기 7 : Dockerfile을 이용한 이미지 생성

이전 글에서 도커 이미지에 대해 알아봤는데 이어서 Dockerfile을 도커 이미지 파일을 생성하는 방법을 살펴보자. 초 간단 Dockerfile 다음은 매우 간단한 Dockerfile 예이다. FROM alpine:3.10 ENTRYPOINT ["echo..

javacan.tistory.com