-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
executable file
·61 lines (37 loc) · 931 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This codebase desgin according to mozilla open source license.
# Redistribution , contribution and improve codebase under license
# convensions. @contact Ali Hassan AliMatrixCode@protonmail.com
# base image
FROM golang:1.19beta1-alpine3.15
# environment params
ENV CGO_ENABLED=0
ENV PORT=5000
ENV HOST=wizdwarfs
# app workspace
RUN mkdir /app
ADD . /app
WORKDIR /app
# set persist storage
ARG WIZ_DIR=/app_data
RUN mkdir -p ${WIZ_DIR}
# declaration persistance storage
ENV WIZ_VOLUME_DIR=/app${WIZ_DIR}/apps.txt
# app modules
COPY go.mod go.sum ./
RUN go mod tidy
#RUN go mod vendor
RUN go mod download
# build app
RUN go build -o wizdwarfs
# testing
RUN go test ./...
# && go test -v ./...
# publish app port
EXPOSE 5000
# peristance storage
VOLUME [ ${WIZ_DIR} ]
# certs
RUN apk --no-cache add ca-certificates
LABEL designed="Wisdom-Enigma Inc"
# initialization container
CMD ["/app/wizdwarfs"]