-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.debian
59 lines (53 loc) · 2.42 KB
/
Dockerfile.debian
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM docker.io/debian:latest
# This Dockerfile is intended for testing and development of panubo-functions.sh and is not for distribution of panubo-functions.sh
# Install test dependencies
RUN set -x \
&& apt-get -y update \
&& apt-get -y install tzdata \
&& rm -rf /var/lib/apt/lists/* \
;
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates git wget procps xz-utils make sudo vim \
&& useradd -m -s /bin/bash -G sudo user \
&& sed -i 's/^%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD:ALL/' /etc/sudoers \
;
# Install ShellCheck (Installing a newer version than is available via apt-get)
RUN set -x \
&& SHELLCHECK_VERSION=0.9.0 \
&& SHELLCHECK_CHECKSUM=700324c6dd0ebea0117591c6cc9d7350d9c7c5c287acbad7630fa17b1d4d9e2f \
&& cd /tmp \
&& wget -nv https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz \
&& echo "${SHELLCHECK_CHECKSUM} shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" > /tmp/SHA256SUM \
&& ( cd /tmp; sha256sum -c SHA256SUM || ( echo "Expected $(sha256sum shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz)"; exit 1; )) \
&& tar -Jxf shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz \
&& mv shellcheck-v${SHELLCHECK_VERSION}/shellcheck /usr/local/bin/shellcheck \
&& rm -rf /tmp/* \
;
# Install gomplate
RUN set -x \
&& GOMPLATE_VERSION=3.8.0 \
&& GOMPLATE_SHA256=847f7d9fc0dc74c33188c2b0d0e9e4ed9204f67c36da5aacbab324f8bfbf29c9 \
&& if ! command -v wget > /dev/null; then \
fetchDeps="${fetchDeps} wget"; \
fi \
&& apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates ${fetchDeps} \
&& wget -nv -O /tmp/gomplate_linux-amd64-slim -L https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-amd64-slim \
&& echo "${GOMPLATE_SHA256} gomplate_linux-amd64-slim" > /tmp/SHA256SUM \
&& ( cd /tmp; sha256sum -c SHA256SUM; ) \
&& mv /tmp/gomplate_linux-amd64-slim /usr/local/bin/gomplate \
&& chmod +x /usr/local/bin/gomplate \
&& rm -rf /tmp/* \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${fetchDeps} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
;
# Install Bats
RUN set -x \
&& cd ~ \
&& git clone https://github.com/bats-core/bats-core.git \
&& cd bats-core \
&& git checkout v1.10.0 \
&& ./install.sh /usr/local \
;