forked from NVIDIA/nvidia-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.deb
37 lines (31 loc) · 923 Bytes
/
Dockerfile.deb
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
FROM ubuntu:14.04
RUN apt-get update && apt-get install -y --no-install-recommends \
vim-nox \
dh-make \
dh-systemd \
fakeroot \
build-essential \
devscripts && \
rm -rf /var/lib/apt/lists/*
ARG USER_ID
ARG CR_NAME
ARG CR_EMAIL
ARG PKG_NAME
ARG PKG_VERS
ARG PKG_REV
ARG PKG_ARCH
VOLUME /dist
VOLUME /build
WORKDIR /tmp/$PKG_NAME-$PKG_VERS
ENV DEBFULLNAME $CR_NAME
ENV DEBEMAIL $CR_EMAIL
ENV REVISION $PKG_VERS-$PKG_REV
ENV ARCHITECTURE $PKG_ARCH
RUN useradd --non-unique --uid $USER_ID nvidia && chown nvidia: .
USER nvidia
CMD tar -xf /dist/*.tar.xz && \
read -p "Update changelog (y/n)? " yn && [ "$yn" = "y" ] && \
dch -c /build/deb/changelog -v $REVISION --no-auto-nmu ; \
dh_make -y -s -c bsd -d -t /build/deb -f /dist/*.tar.xz && \
debuild --preserve-env --dpkg-buildpackage-hook='sh debian/prepare' -i -us -uc -b && \
mv /tmp/*.deb /dist