Skip to content

Commit c7f06cc

Browse files
committed
fix Dockerfile
1 parent ecd1319 commit c7f06cc

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ COPY . .
99

1010
# compile linux only
1111
ENV GOOS=linux
12+
ENV CGO_ENABLED=0
1213

1314
# build the binary with debug information removed
1415
RUN go build -ldflags '-w -s' -a -installsuffix cgo -o server
@@ -24,7 +25,12 @@ COPY --from=build /app/server .
2425
# copy player
2526
COPY --from=build /app/player ./player
2627

28+
ENV OUTPUT=/data
29+
2730
# tell we are exposing our service
2831
EXPOSE 8080 8081 8082
2932

30-
ENTRYPOINT ["./server"]
33+
ENTRYPOINT []
34+
35+
# run it!
36+
CMD ["./server"]

services/common.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ const (
1818

1919
func RegisterCommonFlags(f []cli.Flag) []cli.Flag {
2020
return append(f, cli.StringFlag{
21-
Name: OutputFlag + ", o",
22-
Usage: "output (local path)",
23-
Value: "out",
21+
Name: OutputFlag + ", o",
22+
Usage: "output (local path)",
23+
Value: "out",
24+
EnvVar: "OUTPUT",
2425
})
2526
}
2627

0 commit comments

Comments
 (0)