mirror of
https://github.com/CPunch/gopenfusion.git
synced 2025-05-05 01:10:08 +00:00
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
This commit is contained in:
parent
124bb77f8d
commit
983588b6c9
11
Dockerfile
11
Dockerfile
@ -1,10 +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 ./
|
||||||
|
|
||||||
ENTRYPOINT [ "/bin/sh", "-l", "-c" ]
|
ENTRYPOINT [ "/gopenfusion/server" ]
|
||||||
CMD ["/gopenfusion/server"]
|
|
2
build.sh
2
build.sh
@ -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'
|
Loading…
x
Reference in New Issue
Block a user