Compare commits

...

2 Commits

Author SHA1 Message Date
983588b6c9 dockerfile: switch to scratch
- build.sh: disables CGO and specifies linux
- we really don't need the cstdlib now, and we don't need a busybox shell
2023-06-20 18:33:29 -05:00
124bb77f8d dockerfile: specified entrypoint 2023-06-20 18:24:17 -05:00
2 changed files with 5 additions and 7 deletions

View File

@ -1,9 +1,7 @@
FROM alpine:latest FROM scratch
WORKDIR /gopenfusion
# grab binary # grab binary
COPY ./bin/server ./ WORKDIR /gopenfusion
RUN chmod +x ./server COPY --chmod=0755 ./bin/server ./
CMD ["/gopenfusion/server"] ENTRYPOINT [ "/gopenfusion/server" ]

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
mkdir -p bin mkdir -p bin
go build -o ./bin/server CGO_ENABLED=0 GOOS=linux go build -o ./bin/server
echo 'Done' echo 'Done'