github.com/devtron-labs/ci-runner@v0.0.0-20240518055909-b2672f3349d7/Dockerfile.test (about) 1 ####-------------- 2 3 FROM docker:20.10.24-dind 4 # All these steps will be cached 5 #RUN apk add --no-cache ca-certificates 6 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 && apk add openssh 7 RUN apk add --no-cache go 8 RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime 9 RUN apk -Uuv add groff less python3 py3-pip 10 RUN pip3 install awscli 11 RUN apk --purge -v del py-pip 12 RUN rm /var/cache/apk/* 13 COPY --from=docker/compose:latest /usr/local/bin/docker-compose /usr/bin/docker-compose 14 15 COPY ./buildpack.json /buildpack.json 16 COPY ./git-ask-pass.sh /git-ask-pass.sh 17 RUN chmod +x /git-ask-pass.sh 18 19 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) 20 21 COPY ./ssh-config /root/.ssh/config 22 RUN chmod 644 /root/.ssh/config 23 24 WORKDIR testdir 25 COPY . . 26 27 # To run 28 # docker build -t citest -f Dockerfile.test . 29 # docker run --cap-add=NET_ADMIN -v /tmp/ci-runner:/testdir/tests citest 30 ENTRYPOINT ["go", "test", "-v", "./...", "-coverprofile", "./tests/cover.out"] 31 32