Use regular conf oclib library instead of custom implem to leverage env variable injection fonctionality; Dockerfile refactor
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -1,22 +1,32 @@
|
||||
FROM golang:alpine AS deps
|
||||
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN sed -i '/replace/d' go.mod
|
||||
RUN go mod download -x
|
||||
|
||||
#----------------------------------------------------------------------------------------------
|
||||
|
||||
FROM golang:alpine AS builder
|
||||
LABEL maintainer="IRT PFN"
|
||||
ENV DOCKER_ENVIRONMENT=true
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=deps /go/pkg /go/pkg
|
||||
COPY --from=deps /app/go.mod /app/go.sum ./
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN go build .
|
||||
|
||||
#----------------------------------------------------------------------------------------------
|
||||
FROM oc-monitord:latest AS monitord
|
||||
|
||||
FROM argoproj/argocd:latest
|
||||
|
||||
ENV MONITORD_PATH = "./oc-monitord"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY conf/docker_schedulerd.json /etc/oc/schedulerd.json
|
||||
|
||||
COPY --from=monitord /app/oc-monitord .
|
||||
COPY --from=builder /app/oc-schedulerd .
|
||||
COPY conf/docker_schedulerd.json /etc/oc/schedulerd.json
|
||||
|
||||
Reference in New Issue
Block a user