Last active
October 19, 2020 18:46
-
-
Save pjoe/68d62df3ea7584f832bf61f900f30148 to your computer and use it in GitHub Desktop.
debcargo docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
build: | |
build: . | |
volumes: | |
- ./debcargo-conf:/home/docker/debcargo-conf | |
env_file: .env | |
privileged: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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