forked from sameerdhoot/wolweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDebian_Dockerfile
32 lines (24 loc) · 889 Bytes
/
Debian_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
# docker build -t wolweb .
FROM golang:buster AS builder
LABEL org.label-schema.vcs-url="https://github.com/sameerdhoot/wolweb" \
org.label-schema.url="https://github.com/sameerdhoot/wolweb/blob/master/README.md"
RUN mkdir /wolweb
WORKDIR /wolweb
# Install Dependecies
RUN git clone https://github.com/sameerdhoot/wolweb . && \
go get -d github.com/gorilla/handlers && \
go get -d github.com/gorilla/mux && \
go get -d github.com/ilyakaznacheev/cleanenv
# Build Source Files
RUN go build -o wolweb .
# Create 2nd Stage final image
FROM debian
WORKDIR /wolweb
COPY --from=builder /wolweb/index.html .
COPY --from=builder /wolweb/wolweb .
COPY --from=builder /wolweb/devices.json .
COPY --from=builder /wolweb/config.json .
COPY --from=builder /wolweb/static ./static
ARG WOLWEBPORT=8089
CMD ["/wolweb/wolweb"]
EXPOSE ${WOLWEBPORT}