-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:devtron-labs/devtron into pre-cd-fix
- Loading branch information
Showing
176 changed files
with
8,989 additions
and
2,898 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,46 @@ | ||
FROM golang:1.21 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 | ||
RUN echo $GOPATH && \ | ||
apt update && \ | ||
apt install git gcc musl-dev make -y && \ | ||
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/ | ||
|
||
ADD ./vendor/github.com/Microsoft/ /go/src/github.com/devtron-labs/devtron/vendor/github.com/microsoft/ | ||
RUN GOOS=linux make build-all | ||
|
||
RUN GOOS=linux make build | ||
|
||
# uncomment this post build arg | ||
FROM ubuntu:22.04@sha256:1b8d8ff4777f36f19bfe73ee4df61e3a0b789caeff29caa019539ec7c9a57f95 as devtron-all | ||
|
||
RUN apt update | ||
RUN apt install ca-certificates git 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/devtron . | ||
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/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/argocd-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 | ||
|
||
COPY ./git-ask-pass.sh /git-ask-pass.sh | ||
RUN chmod +x /git-ask-pass.sh | ||
|
||
RUN useradd -ms /bin/bash devtron | ||
RUN chown -R devtron:devtron ./devtron | ||
RUN chown -R devtron:devtron ./git-ask-pass.sh | ||
RUN chown -R devtron:devtron ./auth_model.conf | ||
RUN chown -R devtron:devtron ./scripts | ||
RUN apt update && \ | ||
apt install ca-certificates git curl -y && \ | ||
apt clean autoclean && \ | ||
apt autoremove -y && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
useradd -ms /bin/bash devtron | ||
|
||
USER devtron | ||
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/devtron . | ||
|
||
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/auth_model.conf . | ||
|
||
CMD ["./devtron"] | ||
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/argocd-assets/ /go/src/github.com/devtron-labs/devtron/vendor/github.com/argoproj/argo-cd/assets | ||
|
||
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/devtron-reference-helm-charts scripts/devtron-reference-helm-charts | ||
|
||
#FROM alpine:3.15.0 as devtron-ea | ||
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/sql scripts/sql | ||
|
||
#RUN apk add --no-cache ca-certificates | ||
#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 --chown=devtron:devtron --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/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/argo-assets/APPLICATION_TEMPLATE.JSON scripts/argo-assets/APPLICATION_TEMPLATE.JSON | ||
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/argo-assets/APPLICATION_TEMPLATE.tmpl scripts/argo-assets/APPLICATION_TEMPLATE.tmpl | ||
|
||
COPY --chown=devtron:devtron ./git-ask-pass.sh /git-ask-pass.sh | ||
|
||
RUN chmod +x /git-ask-pass.sh | ||
|
||
USER devtron | ||
|
||
#CMD ["./devtron-ea"] | ||
CMD ["./devtron"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.