We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fc58f7 commit e180a79Copy full SHA for e180a79
Dockerfile
@@ -0,0 +1,17 @@
1
+FROM golang:1.16.4-alpine3.13 AS builder
2
+
3
+COPY ./ /github.com/Lapp-coder/websocket-chat
4
+WORKDIR /github.com/Lapp-coder/websocket-chat
5
6
+RUN go mod download
7
+RUN go build -o ./build/bin/chat ./...
8
9
+FROM alpine:latest
10
11
+WORKDIR /opt/
12
13
+COPY --from=builder /github.com/Lapp-coder/websocket-chat/build/bin/chat .
14
15
+EXPOSE 8080
16
17
+CMD ["./chat"]
Makefile
@@ -6,3 +6,9 @@ build:
run: build
./main
+docker-build:
+ docker build -t websocket-chat .
+docker-run: docker-build
+ docker run --name=chat -e CHAT_HOST=0.0.0.0 -e CHAT_PORT=8080 -p 8080:8080 --rm websocket-chat
0 commit comments