Dockerfile_TYYun
1.1 KB
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
FROM golang:alpine
ENV APP_DIR $GOPATH/src/project-20211220
ENV POSTGRESQL_DB_NAME="" \
POSTGRESQL_USER="" \
POSTGRESQL_PASSWORD="" \
POSTGRESQL_HOST="" \
POSTGRESQL_PORT="" \
REDIS_HOST="" \
REDIS_PORT="" \
REDIS_AUTH="" \
LOG_LEVEL="debug" \
ERROR_BASE_CODE="1" \
ERROR_BASE_CODE_MULTIPLE="2000" \
ENABLE_KAFKA_LOG="false" \
HTTP_PORT="8082" \
SERVICE_ENV="prd" \
ALLIED_CREATION_USER_HOST="https://allied-creation-user-prd.fjmaimaimai.com" \
MANUFACTURE_DEFAULT_COMPANYID="1" \
MANUFACTURE_DEFAULT_ORGID="1" \
MANUFACTURE_DEFAULT_WORKSHOPID="2" \
MANUFACTURE_PRODUCT_TYPE="0502010004ST,0502010004ST" \
MQTT_HOST="47.97.5.102" \
MQTT_PORT="6000"
RUN mkdir -p $APP_DIR
WORKDIR $APP_DIR/
COPY ./pkg pkg
COPY ./config config
COPY ./go.mod go.mod
COPY ./go.sum go.sum
COPY ./main.go main.go
RUN ["ln","-sf","/usr/share/zoneinfo/Asia/Shanghai","/etc/localtime"]
ENV GO111MODULE on
ENV GOPROXY https://goproxy.cn
RUN ["go","mod","tidy"]
RUN ["go","build"]
RUN ["ls"]
ENTRYPOINT ["./allied-creation-manufacture"]