-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
48 lines (41 loc) · 1011 Bytes
/
dockerfile
File metadata and controls
48 lines (41 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# 1
FROM node:16 AS builder
# 2 컨테이너 내부 경로
WORKDIR /app
# 3.1앱 의존성 설치
# 가능한 경우(npm@5+) package.json과 package-lock.json을 모두 복사하기 위해
# 와일드카드를 사용
COPY package*.json ./
# 3.2 앱 소스 추가(?)
COPY . .
# 4
RUN npm install
# 5
RUN npm run build
# STEP 2
#6
FROM node:16-alpine
#6.1 Korean Fonts
RUN apk --update add fontconfig
RUN mkdir -p /usr/share/fonts/nanumfont
RUN wget http://cdn.naver.com/naver/NanumFont/fontfiles/NanumFont_TTF_ALL.zip
RUN unzip NanumFont_TTF_ALL.zip -d /usr/share/fonts/nanumfont
RUN fc-cache -f && rm -rf /var/cache/*
#6.2 bash install
RUN apk add bash
#6.3 Language
ENV LANG=ko_KR.UTF-8 \
LANGUAGE=ko_KR.UTF-8
#6.4 Set the timezone in docker
RUN apk --no-cache add tzdata && \
cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime && \
echo "Asia/Seoul" > /etc/timezone
#7
WORKDIR /app
#8
# Node ENV
#ENV NODE_ENV=development
#9
COPY --from=builder /app ./
#10
CMD [ "node", "dist/main" ]