-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (27 loc) · 804 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
29
30
31
32
33
34
35
36
37
38
39
40
# syntax=docker/dockerfile:1
## README
# Please review the configuration files in the /configs directory and adjust configurations
# accordingly.
## Build
FROM golang:1.22-alpine AS build
RUN apk update && apk --no-cache --update add make
WORKDIR /build
COPY . ./
RUN make dep
RUN make build ARCH=linux
## Deploy
FROM alpine:latest
WORKDIR /
# Compiled binary.
COPY --from=build /build/MCQPlatform-linux /MCQPlatform-linux
# Service Configurations.
COPY --from=build /build/configs /etc/MCQ_Platform.conf/
# Port list:
# Please set these ports according to the configurations in the YAML files in /configs directory.
# 1) HTTP REST
# 2) HTTP GraphQL
EXPOSE 44243 44255
# Run Gin Web Framework in production mode.
ENV GIN_MODE=release
# Launch application.
ENTRYPOINT ["./MCQPlatform-linux"]