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 6699ed4 commit 3dff80aCopy full SHA for 3dff80a
Dockerfile
@@ -1,11 +1,14 @@
1
-FROM golang
+FROM golang as builder
2
WORKDIR /app
3
COPY . .
4
WORKDIR /app/client
5
-RUN go build -o app .
+RUN export CGO_ENABLED=0 && go build -o app .
6
WORKDIR /app/server
7
8
9
RUN chmod +x start.sh
10
+
11
+FROM alpine
12
+COPY --from=builder /app /app
13
EXPOSE 80 1180
14
CMD ["/app/start.sh"]
start.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
if [ -z $ws ]; then
echo "Starting server"
/app/server/app
0 commit comments