forked from talariadb/talaria
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
33 lines (27 loc) · 929 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
FROM golang:1.17 AS builder
ARG GO111MODULE="on"
ARG GOOS="linux"
ARG GOARCH="amd64"
ENV GO111MODULE=${GO111MODULE}
ENV GOOS=${GOOS}
ENV GOARCH=${GOARCH}
# GOPATH => /go
RUN mkdir -p /go/src/talaria
COPY . src/talaria
RUN cd src/talaria && go build . && test -x talaria
FROM debian:latest AS base
LABEL maintainer=${MAINTAINER}
# # add ca certificates for http secured connection
RUN apt-get update && apt-get install -y ca-certificates && apt-get install -y dumb-init && rm -rf /var/cache/apk/*
WORKDIR /root/
ARG GO_BINARY=talaria
COPY --from=builder /go/src/talaria/${GO_BINARY} .
#COPY ${GO_BINARY} .
ADD entrypoint.sh .
RUN mkdir /etc/talaria/ && chmod +x /root/${GO_BINARY} /root/entrypoint.sh
ENV TALARIA_RC=/etc/talaria/talaria.rc
# # Expose the port and start the service
EXPOSE 8027
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["bash", "-c", "/root/entrypoint.sh"]