Browse Source

update Dockerfile to build images with go mod

pull/14/head
Vladimir Smagin 1 year ago
parent
commit
6fcd6b7ef8
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      Dockerfile

+ 6
- 3
Dockerfile View File

@@ -1,14 +1,17 @@
FROM golang:1.12-alpine

WORKDIR /go/src/github.com/tekliner/rabbitmq-operator
RUN apk update
RUN apk add git mercurial

WORKDIR /app/rabbitmq-operator
COPY . .

WORKDIR /go/src/github.com/tekliner/rabbitmq-operator/cmd/manager
WORKDIR /app/rabbitmq-operator/cmd/manager

RUN CGO_ENABLED=0 go build
RUN go install

FROM alpine:3.9
FROM alpine:3.10

COPY --from=0 /go/bin/manager /usr/local/bin/rabbitmq-operator



Loading…
Cancel
Save