forked from devtron-labs/devtron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DockerfileEA
33 lines (26 loc) · 1.45 KB
/
DockerfileEA
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM golang:1.20 AS build-env
RUN echo $GOPATH
RUN apt update
RUN apt install git gcc musl-dev make -y
RUN go install github.com/google/wire/cmd/wire@latest
WORKDIR /go/src/github.com/devtron-labs/devtron
ADD . /go/src/github.com/devtron-labs/devtron/
RUN GOOS=linux make build-all
FROM ubuntu as devtron-ea
RUN apt update
RUN apt install ca-certificates curl -y
RUN apt clean autoclean
RUN apt autoremove -y && rm -rf /var/lib/apt/lists/*
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/auth_model.conf .
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/cmd/external-app/devtron-ea .
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/vendor/github.com/argoproj/argo-cd/assets/ /go/src/github.com/devtron-labs/devtron/vendor/github.com/argoproj/argo-cd/assets
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/devtron-reference-helm-charts scripts/devtron-reference-helm-charts
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/sql scripts/sql
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/casbin scripts/casbin
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/argo-assets/APPLICATION_TEMPLATE.tmpl scripts/argo-assets/APPLICATION_TEMPLATE.tmpl
RUN useradd -ms /bin/bash devtron
RUN chown -R devtron:devtron ./devtron-ea
RUN chown -R devtron:devtron ./auth_model.conf
RUN chown -R devtron:devtron ./scripts
USER devtron
CMD ["./devtron-ea"]