Skip to content

Commit

Permalink
Merge pull request #85 from artursouza/fix_docker_image
Browse files Browse the repository at this point in the history
Fixes docker image not responding to 8080.
  • Loading branch information
artursouza committed Sep 28, 2020
2 parents 417c583 + 8b22b47 commit 85793d0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/webserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func RunWebServer(port int) {

srv := &http.Server{
Handler: r,
Addr: fmt.Sprintf("127.0.0.1:%v", port),
Addr: fmt.Sprintf("0.0.0.0:%v", port),
WriteTimeout: 15 * time.Second,
ReadTimeout: 15 * time.Second,
}
Expand Down
4 changes: 3 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM alpine:latest as alpine

ARG BIN_PATH
EXPOSE 8080/tcp
WORKDIR /app
ADD $BIN_PATH/dashboard .
ADD $BIN_PATH/web .
ADD $BIN_PATH/web ./web
ENTRYPOINT ["./dashboard"]

4 changes: 3 additions & 1 deletion docker/Dockerfile-windows
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ FROM mcr.microsoft.com/windows/nanoserver:$WINDOWS_VERSION
COPY --from=servercore /windows/system32/netapi32.dll /windows/system32/netapi32.dll

ARG BIN_PATH
EXPOSE 8080/tcp
WORKDIR /app
ADD $BIN_PATH/dashboard.exe .
ADD $BIN_PATH/web .
ADD $BIN_PATH/web ./web
CMD ["dashboard.exe"]

0 comments on commit 85793d0

Please sign in to comment.