forked from cloud-barista/cloud-barista
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (25 loc) · 1.06 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
##############################################################
## Stage 1 - Go Build
##############################################################
FROM golang:alpine AS builder
RUN apk update && apk add --no-cache bash
#RUN apk add gcc
ADD . /go/src/github.com/cloud-barista/cb-tumblebug
WORKDIR /go/src/github.com/cloud-barista/cb-tumblebug
WORKDIR src
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -extldflags "-static"' -tags cb-tumblebug -o cb-tumblebug -v
#############################################################
## Stage 2 - Application Setup
##############################################################
FROM ubuntu:latest
# use bash
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
WORKDIR /app
COPY --from=builder /go/src/github.com/cloud-barista/cb-tumblebug/conf/* /app/conf/
COPY --from=builder /go/src/github.com/cloud-barista/cb-tumblebug/src/cb-tumblebug /app/src/
#RUN /bin/bash -c "source /app/conf/setup.env"
ENV CBSTORE_ROOT /app
ENV CBLOG_ROOT /app
ENV SPIDER_URL http://cb-spider:1024/spider
ENTRYPOINT [ "/app/src/cb-tumblebug" ]
EXPOSE 1323