-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
31 lines (24 loc) · 1.02 KB
/
Dockerfile
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
31
FROM alpine:3.18
ARG VERSION=1.10.0
LABEL maintainer="[email protected]" \
license="MIT" \
org.label-schema.schema-version="1.0" \
org.label-schema.vendor="graze" \
org.label-schema.name="bats" \
org.label-schema.version="${VERSION}" \
org.label-schema.description="alpine image for testing with bats" \
org.label-schema.vcs-url="https://github.com/graze/docker-bats" \
org.label-schema.docker.cmd="docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/app graze/bats"
RUN apk add --no-cache --update bash curl docker make jq git && \
curl -o "/tmp/v${VERSION}.tar.gz" -L "https://github.com/bats-core/bats-core/archive/v${VERSION}.tar.gz" && \
tar -x -z -f "/tmp/v${VERSION}.tar.gz" -C /tmp/ && \
bash "/tmp/bats-core-${VERSION}/install.sh" /usr/local && \
rm -rf /tmp/*
VOLUME /app
WORKDIR /app
ARG BUILD_DATE
ARG VCS_REF
LABEL org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.build-date=$BUILD_DATE
ENTRYPOINT ["/usr/local/bin/bats"]
CMD ["-h"]