forked from sameerdhoot/wolweb
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Debian_Dockerfile
36 lines (26 loc) · 883 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
33
34
35
36
# docker build -t wolweb .
FROM golang:bullseye AS builder
LABEL org.label-schema.vcs-url="https://github.com/bnhf/wolweb" \
org.label-schema.url="https://github.com/bnhf/wolweb/blob/master/README.md"
RUN mkdir /wolweb
WORKDIR /wolweb
# Install Dependecies
RUN apt-get update && apt-get install -y git
RUN git clone https://github.com/bnhf/wolweb . && \
go mod init 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/config.json .
COPY --from=builder /wolweb/start.sh /
RUN chmod +x /start.sh
ARG WOLWEBPORT=8089
EXPOSE ${WOLWEBPORT}
CMD ["/start.sh"]