Skip to content

Instantly share code, notes, and snippets.

@pjoe
Last active October 19, 2020 18:46
Show Gist options
  • Save pjoe/68d62df3ea7584f832bf61f900f30148 to your computer and use it in GitHub Desktop.
Save pjoe/68d62df3ea7584f832bf61f900f30148 to your computer and use it in GitHub Desktop.
debcargo docker
version: "3"
services:
build:
build: .
volumes:
- ./debcargo-conf:/home/docker/debcargo-conf
env_file: .env
privileged: true
FROM debian:unstable
ARG USER=docker
ARG UID=1000
ARG GID=1000
RUN apt-get update && apt-get install -y \
autopkgtest \
debcargo \
debootstrap \
devscripts \
dh-cargo \
git \
reprepro \
sbuild \
schroot \
sudo \
&& rm -rf /var/lib/apt/lists/*
RUN sbuild-createchroot --include=eatmydata,ccache,gnupg,dh-cargo,cargo,lintian,perl-openssl-defaults \
--chroot-prefix debcargo-unstable unstable \
/srv/chroot/debcargo-unstable-amd64-sbuild http://deb.debian.org/debian
RUN apt-get update
RUN useradd -m --uid=${UID} ${USER} \
&& echo "${USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \
&& sbuild-adduser ${USER} \
&& adduser ${USER} sbuild
USER ${UID}
WORKDIR /home/${USER}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment