Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Changes for multi-arch build #2459

Merged
merged 6 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
FROM golang:1.18-alpine3.14 AS build-env
FROM golang:1.18 AS build-env

RUN echo $GOPATH

RUN apk add --no-cache git gcc musl-dev
RUN apk add --update make
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

# uncomment this post build arg
FROM alpine:3.15.0 as devtron-all
RUN apk add --no-cache ca-certificates
RUN apk update
RUN apk add git
RUN apk add curl
FROM ubuntu 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
Expand Down
15 changes: 8 additions & 7 deletions DockerfileEA
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
FROM golang:1.18-alpine3.14 AS build-env
FROM golang:1.18 AS build-env

RUN echo $GOPATH

RUN apk add --no-cache git gcc musl-dev
RUN apk add --update make
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 alpine:3.15.0 as devtron-ea
FROM ubuntu as devtron-ea

RUN apk add --no-cache ca-certificates
RUN apk add curl
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 .

Expand Down