-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathDockerfile.test
32 lines (24 loc) · 1.12 KB
/
Dockerfile.test
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
####--------------
FROM docker:20.10.24-dind
# All these steps will be cached
#RUN apk add --no-cache ca-certificates
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
RUN apk add --no-cache go
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
RUN apk -Uuv add groff less python3 py3-pip
RUN pip3 install awscli
RUN apk --purge -v del py-pip
RUN rm /var/cache/apk/*
COPY --from=docker/compose:latest /usr/local/bin/docker-compose /usr/bin/docker-compose
COPY ./buildpack.json /buildpack.json
COPY ./git-ask-pass.sh /git-ask-pass.sh
RUN chmod +x /git-ask-pass.sh
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)
COPY ./ssh-config /root/.ssh/config
RUN chmod 644 /root/.ssh/config
WORKDIR testdir
COPY . .
# To run
# docker build -t citest -f Dockerfile.test .
# docker run --cap-add=NET_ADMIN -v /tmp/ci-runner:/testdir/tests citest
ENTRYPOINT ["go", "test", "-v", "./...", "-coverprofile", "./tests/cover.out"]