mirror of
https://github.com/openfaas/faas.git
synced 2025-06-08 16:26:47 +00:00
Static binary
This commit is contained in:
parent
8fe7cb691d
commit
a3cb54ab87
1
watchdog/.gitignore
vendored
Normal file
1
watchdog/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
fwatchdog
|
@ -1,7 +1,9 @@
|
||||
FROM alpine:edge
|
||||
FROM alpine:latest
|
||||
ENTRYPOINT []
|
||||
|
||||
COPY ./fwatchdog /usr/bin/fwatchdog
|
||||
ENV fprocess "cat -b"
|
||||
ENV fprocess "cat"
|
||||
|
||||
|
||||
EXPOSE 8080
|
||||
CMD ["fwatchdog"]
|
||||
CMD ["/usr/bin/fwatchdog"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
FROM golang:1.7.3
|
||||
RUN mkdir -p /go/src/fwatchdog
|
||||
COPY main.go /go/src/fwatchdog
|
||||
WORKDIR /go/src/fwatchdog
|
||||
RUN mkdir -p /go/src/app
|
||||
COPY main.go /go/src/app
|
||||
WORKDIR /go/src/app
|
||||
RUN go get -d -v
|
||||
RUN go build
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
|
||||
|
@ -2,6 +2,5 @@
|
||||
|
||||
docker build -t watchdog:latest . -f Dockerfile.build
|
||||
docker create --name buildoutput watchdog:latest
|
||||
docker cp buildoutput:/go/src/fwatchdog/fwatchdog ./
|
||||
docker cp buildoutput:/go/src/app/app ./fwatchdog
|
||||
docker rm buildoutput
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user