-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
42 lines (30 loc) · 1.07 KB
/
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
# arkadiko
# https://github.com/topfreegames/arkadiko
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright © 2016 Top Free Games <[email protected]>
FROM golang:1.15-alpine AS build
LABEL app=arkadiko
LABEL builder=true
LABEL maintainer='TFG CO <[email protected]>'
WORKDIR /src
COPY vendor ./vendor
COPY . .
# Build a static binary.
RUN CGO_ENABLED=0 GOOS=linux go build -mod vendor -a -installsuffix cgo -o arkadiko .
# Verify if the binary is truly static.
RUN ldd /src/arkadiko 2>&1 | grep -q 'Not a valid dynamic program'
FROM alpine
COPY --from=build /src/arkadiko ./arkadiko
COPY --from=build /src/config ./config
ENV ARKADIKO_MQTTSERVER_HOST localhost
ENV ARKADIKO_MQTTSERVER_PORT 1883
ENV ARKADIKO_MQTTSERVER_USER admin
ENV ARKADIKO_MQTTSERVER_PASS admin
ENV USE_BASICAUTH false
ENV ARKADIKO_BASICAUTH_USERNAME ""
ENV ARKADIKO_BASICAUTH_PASSWORD ""
ENTRYPOINT ["./arkadiko", "start", "--bind", "0.0.0.0", "--port", "8890", "--config", "/config/local.yml"]
EXPOSE 8890
LABEL app=arkadiko
LABEL maintainer='TFG CO <[email protected]>'