github.com/devtron-labs/ci-runner@v0.0.0-20240518055909-b2672f3349d7/Dockerfile (about) 1 ####-------------- 2 FROM golang:1.20.6-alpine3.18 AS build-env 3 4 RUN apk add --no-cache git gcc musl-dev 5 RUN apk add --update make 6 7 WORKDIR /go/src/github.com/devtron-labs/cirunner 8 ADD . /go/src/github.com/devtron-labs/cirunner/ 9 COPY . . 10 # Build the binary 11 RUN CGO_ENABLED=0 GOOS=linux go build -buildvcs=false -a -installsuffix cgo -o /go/bin/cirunner 12 13 14 FROM docker:20.10.24-dind 15 # All these steps will be cached 16 #RUN apk add --no-cache ca-certificates 17 RUN apk update && apk add --no-cache --virtual .build-deps && apk add bash && apk add make && apk add curl && apk add git && apk add zip && apk add jq 18 RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime 19 RUN apk -Uuv add groff less python3 py3-pip 20 RUN pip3 install awscli 21 RUN apk --purge -v del py-pip 22 RUN rm /var/cache/apk/* 23 COPY --from=docker/compose:latest /usr/local/bin/docker-compose /usr/bin/docker-compose 24 25 COPY ./buildpack.json /buildpack.json 26 COPY ./git-ask-pass.sh /git-ask-pass.sh 27 RUN chmod +x /git-ask-pass.sh 28 29 RUN (curl -sSL "https://github.com/buildpacks/pack/releases/download/v0.27.0/pack-v0.27.0-linux.tgz" | tar -C /usr/local/bin/ --no-same-owner -xzv pack) 30 31 COPY --from=build-env /go/bin/cirunner . 32 COPY ./ssh-config /root/.ssh/config 33 RUN chmod 644 /root/.ssh/config 34 35 # passing PARENT_MODE as argument to cirunner as default behavior 36 ENTRYPOINT ["./cirunner", "PARENT_MODE"]