forked from jinr-greenlab/go-adc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (19 loc) · 768 Bytes
/
Dockerfile
File metadata and controls
30 lines (19 loc) · 768 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
ARG BUILD_IMAGE=golang:1.17.3-bullseye
ARG RELEASE_IMAGE=debian:bullseye
FROM ${BUILD_IMAGE} as builder
WORKDIR /src
SHELL [ "/bin/bash", "-cex" ]
COPY go.mod go.sum /src/
RUN go mod download
COPY . /src/
RUN make build
FROM ${RELEASE_IMAGE} as release
RUN apt-get update && apt-get install -y iproute2 telnet net-tools bash-completion vim
LABEL org.opencontainers.image.authors='greenlab@jinr.ru' \
org.opencontainers.image.url='https://dlnp.jinr.ru' \
org.opencontainers.image.vendor='GreenLab' \
org.opencontainers.image.licenses='Apache-2.0'
RUN echo 'source /etc/bash_completion' >> /etc/bash.bashrc \
&& echo 'source <(go-adc completion)' >> /etc/bash.bashrc
COPY --from=builder /src/bin/go-adc /usr/local/bin/go-adc
WORKDIR /data