mirror of
https://github.com/openfaas/faas.git
synced 2025-06-09 08:46:48 +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
|
COPY ./fwatchdog /usr/bin/fwatchdog
|
||||||
ENV fprocess "cat -b"
|
ENV fprocess "cat"
|
||||||
|
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
CMD ["fwatchdog"]
|
CMD ["/usr/bin/fwatchdog"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
FROM golang:1.7.3
|
FROM golang:1.7.3
|
||||||
RUN mkdir -p /go/src/fwatchdog
|
RUN mkdir -p /go/src/app
|
||||||
COPY main.go /go/src/fwatchdog
|
COPY main.go /go/src/app
|
||||||
WORKDIR /go/src/fwatchdog
|
WORKDIR /go/src/app
|
||||||
RUN go get -d -v
|
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 build -t watchdog:latest . -f Dockerfile.build
|
||||||
docker create --name buildoutput watchdog:latest
|
docker create --name buildoutput watchdog:latest
|
||||||
docker cp buildoutput:/go/src/fwatchdog/fwatchdog ./
|
docker cp buildoutput:/go/src/app/app ./fwatchdog
|
||||||
docker rm buildoutput
|
docker rm buildoutput
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user