diff --git a/Dockerfile b/Dockerfile index bc2512b..26dcbf8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,7 @@ -FROM alpine:latest - -WORKDIR /gopenfusion +FROM scratch # grab binary -COPY ./bin/server ./ -RUN chmod +x ./server +WORKDIR /gopenfusion +COPY --chmod=0755 ./bin/server ./ -ENTRYPOINT [ "/bin/sh", "-l", "-c" ] -CMD ["/gopenfusion/server"] \ No newline at end of file +ENTRYPOINT [ "/gopenfusion/server" ] \ No newline at end of file diff --git a/build.sh b/build.sh index df9cfa3..c2dbab7 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #!/bin/sh mkdir -p bin -go build -o ./bin/server +CGO_ENABLED=0 GOOS=linux go build -o ./bin/server echo 'Done' \ No newline at end of file