-
Notifications
You must be signed in to change notification settings - Fork 21
/
Dockerfile.ci
38 lines (31 loc) · 1.76 KB
/
Dockerfile.ci
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
# syntax=docker/dockerfile:1
FROM debian:bullseye-20210902-slim
RUN apt-get update && apt-get install -y \
bash \
build-essential \
bzip2 \
curl \
direnv \
git \
build-essential \
python \
python-dev \
python3 \
python3-pip \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --upgrade gitlint
ARG ASDF_VERSION
RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v${ASDF_VERSION}
RUN echo ". ${HOME}/.asdf/asdf.sh" >> ${HOME}/.bashrc
RUN --mount=type=bind,target=/tmp/kommander-cli,readwrite=true \
cd /tmp/kommander-cli && \
bash -ec ". ~/.asdf/asdf.sh && make install-tools && \
pre-commit install -t pre-commit -t commit-msg --install-hooks"
ARG DOCKER_VERSION
RUN curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz | \
tar xz -C /usr/local/bin --strip-components=1 docker/docker
# needed to be able to pull private repos, e.g. in 'go mod download'
RUN git config --global url."[email protected]:".insteadOf "https://github.com/"
RUN git config --system --add safe.directory /runner/_work/kommander-applications/kommander-applications
RUN mkdir -p ~/.ssh && echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=' > ~/.ssh/known_hosts