Skip to content

Commit

Permalink
Update Debian_Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sameerdhoot committed Jul 20, 2023
1 parent af1bdac commit 89b0ce5
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Debian_Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# docker build -t wolweb .
FROM golang:buster AS builder
FROM golang:1.20-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"
Expand All @@ -9,9 +9,8 @@ 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
go mod tidy && \
go mod download

# Build Source Files
RUN go build -o wolweb .
Expand All @@ -25,8 +24,16 @@ COPY --from=builder /wolweb/devices.json .
COPY --from=builder /wolweb/config.json .
COPY --from=builder /wolweb/static ./static

RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*

ARG WOLWEBPORT=8089
ENV WOLWEBPORT=${WOLWEBPORT}

CMD ["/wolweb/wolweb"]

EXPOSE ${WOLWEBPORT}
HEALTHCHECK --interval=5s --timeout=3s \
CMD curl --silent --show-error --fail http://localhost:${WOLWEBPORT}/wolweb/health || exit 1

0 comments on commit 89b0ce5

Please sign in to comment.