Debian Codegraph @

test/Dockerfile

raw
1 ARG BASH
2
3 FROM alpine/git:v2.30.0 as bats
4 ARG BATS_VERSION
5 RUN git clone https://github.com/bats-core/bats-core.git /root/bats-core \
6 && cd /root/bats-core \
7 && git checkout "${BATS_VERSION}"
8
9 FROM bash:$BASH
10 # Gnu tools
11 RUN if [[ "${GNU:-}" == True ]];then \
12 apk add sed coreutils findutils \
13 ;fi
14 # Bats
15 RUN apk add --update parallel ncurses git \
16 && mkdir -p ~/.parallel \
17 && touch ~/.parallel/will-cite
18 COPY --from=bats /root/bats-core /root/bats-core
19 RUN /root/bats-core/install.sh "/usr/local"
20 # Clean
21 RUN rm -rf /var/cache/apk/*
22 # Setup
23 RUN echo 'source /etc/profile' >> ~/.bashrc
24 WORKDIR /code/
25 CMD ["bash"]