#110: Started fix for docker container versions and k8s support
This commit is contained in:
@@ -1,21 +1,16 @@
|
||||
#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 -u github.com/docker/docker/api/types
|
||||
RUN go get -u github.com/docker/docker/api/types/container
|
||||
RUN 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"]
|
||||
|
||||
Reference in New Issue
Block a user