-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (34 loc) · 996 Bytes
/
Dockerfile
File metadata and controls
44 lines (34 loc) · 996 Bytes
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.15 AS build1
ENV GOPROXY "https://goproxy.cn"
USER root
WORKDIR /root
COPY go.mod go.sum ./
RUN go mod download
ADD . ./
WORKDIR /root/cmd/label
RUN go build -o label .
FROM golang:1.15 AS build2
ENV GOPROXY "https://goproxy.cn"
USER root
WORKDIR /src
# enable modules caching in separate layer
COPY go.mod go.sum ./
RUN go mod download
COPY ./eth-bee/. ./
RUN make binary
#FROM debian:10.9-slim
FROM ubuntu:18.04
#ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install wget -y && apt-get install -y --no-install-recommends \
ca-certificates; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*; \
groupadd -r bee --gid 999; \
useradd -r -g bee --uid 999 --no-log-init -m bee;
# make sure mounted volumes have correct permissions
RUN mkdir -p /home/bee/.bee && chown 999:999 /home/bee/.bee
COPY --from=build2 /src/dist/bee /usr/local/bin/bee
COPY --from=build1 /root/cmd/label /
EXPOSE 1633 1634 1635
WORKDIR /home/bee
VOLUME /home/bee/.bee