-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (22 loc) · 900 Bytes
/
Dockerfile
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
FROM golang:1.19.7-alpine3.17
LABEL maintainer="[email protected]"
###############################################################################
# INSTALLATION
###############################################################################
# 設置固定的項目路徑
ENV WORKDIR /usr/src/app
# 添加應用可執行文件,並設置執行權限
COPY . $WORKDIR
RUN chmod +x $WORKDIR
# 添加I18N多語言文件、靜態文件、配置文件、模板文件
ADD i18n $WORKDIR/i18n
ADD public $WORKDIR/public
ADD config $WORKDIR/config
ADD template $WORKDIR/template
###############################################################################
# START
###############################################################################
WORKDIR $WORKDIR
RUN go mod tidy
CMD ["go", "run", "./main.go"]
EXPOSE 8322