-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (26 loc) · 1.04 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
43
44
FROM golang:1.22.2-alpine AS builder
WORKDIR /app
RUN set -eux \
&& apk add --no-cache --update make
COPY ["./go.mod", "./go.sum", "/app/"]
RUN set -eux \
&& go mod download
COPY ["./server/", "/app/server/"]
COPY ["./Makefile", "/app/"]
RUN set -eux \
&& export CGO_ENABLED=0 \
&& make build
FROM scratch AS rootfs
COPY --from=builder --chmod=0775 ["/app/build/release/tg-events-service", "/app/tg-events-service"]
FROM alpine:3.19
COPY --from=rootfs ["/", "/"]
WORKDIR /app
CMD [ "/app/tg-events-service" ]
LABEL maintainer="Aleksandar Puharic <[email protected]>" \
org.opencontainers.image.documentation="https://github.com/N0rthernL1ghts/telegram-event-server/wiki" \
org.opencontainers.image.source="https://github.com/N0rthernL1ghts/telegram-event-server" \
org.opencontainers.image.description="Telegram Event Server 1.0.0 - Build ${TARGETPLATFORM}" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.version="1.0.0"
ENV ALLOWED_ORIGINS="http://127.0.0.1"
EXPOSE 8080/TCP