1
0
Fork 0

Initial commit

main
Ambrose Chua 2021-05-15 19:26:49 +08:00
commit 884c0508fc
5 changed files with 50 additions and 0 deletions

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
ARG base=concourse/concourse:latest
FROM ${base}
RUN apt-get update \
&& apt-get install -y \
jq \
&& mv /usr/local/concourse/bin/runc /usr/local/concourse/bin/runc-original
ENV RUNC=/usr/local/concourse/bin/runc-original
COPY runc-wrapper /usr/local/concourse/bin/runc

9
Dockerfile.dev Normal file
View File

@ -0,0 +1,9 @@
FROM concourse/concourse-dev:latest
RUN apt-get update \
&& apt-get install -y \
jq \
&& mv /usr/local/concourse/bin/runc /usr/local/concourse/bin/runc-original
ENV RUNC=/usr/local/concourse/bin/runc-original
COPY runc-wrapper /usr/local/concourse/bin/runc

9
Dockerfile.latest Normal file
View File

@ -0,0 +1,9 @@
FROM concourse/concourse:latest
RUN apt-get update \
&& apt-get install -y \
jq \
&& mv /usr/local/concourse/bin/runc /usr/local/concourse/bin/runc-original
ENV RUNC=/usr/local/concourse/bin/runc-original
COPY runc-wrapper /usr/local/concourse/bin/runc

12
README.md Normal file
View File

@ -0,0 +1,12 @@
# `serverwentdown/concourse-kvm`
Ugly patch to concourse's Docker image to mount the KVM device, until concourse/concourse#2784 is resolved.
## Tags
- [`latest`](Dockerfile.latest): Built from `concourse/concourse:latest`
- [`dev`](Dockerfile.dev): Built from `concourse/concourse-dev:latest`
<!-- vim: set conceallevel=2 et ts=2 sw=2: -->

10
runc-wrapper Normal file
View File

@ -0,0 +1,10 @@
#!/bin/sh
RUNC=${RUNC:=runc}
if [ -f config.json ]; then
mv config.json config.old.json
jq -c '.mounts |= . + [{ "destination": "/dev/kvm", "type": "bind", "source": "/dev/kvm", "options": [ "bind", "rw" ] }]' config.old.json > config.json
fi
exec $RUNC "$@"