siemonster :: implementation of parent's network

This commit is contained in:
Harduino
2020-08-01 21:42:40 +03:00
parent 2b773f3c24
commit d4a82713db
4 changed files with 69 additions and 97 deletions
+15 -19
View File
@@ -1,21 +1,17 @@
#from golang as builder
#
#RUN mkdir /app
#WORKDIR /app
#COPY worker.go /app/worker.go
#
#RUN go get github.com/docker/docker/api/types
#RUN go get github.com/docker/docker/api/types/container
#RUN go get -u github.com/docker/docker/client
#
#RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o worker .
#
from golang as builder
# THis is a workaround until I get docker/docker to build in a dockerfile
# PS: This is tricky to google.
# Might not work on some machines.
from scratch
#COPY --from=builder /app/ /
COPY worker.bin /worker.bin
WORKDIR /app
CMD ["./worker.bin"]
RUN go get github.com/docker/docker/api/types && \
go get github.com/docker/docker/api/types/container && \
go get -u github.com/docker/docker/client
COPY worker.go /app/worker.go
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o worker .
FROM alpine:3.12
RUN apk add --no-cache bash
COPY --from=builder /app/ /
CMD ["./worker"]