-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
64 lines (47 loc) · 1.59 KB
/
Dockerfile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Default release is 18.04
ARG BASE_IMAGE_RELEASE=18.04
# Default base image
ARG BASE_IMAGE=ubuntu:18.04
# use FROM BASE_IMAGE
# define FROM befire use ENV command
FROM ${BASE_IMAGE}
# define ARG
ARG BASE_IMAGE_RELEASE
ARG BASE_IMAGE
# set non interactive
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# enable source list
RUN sed -i '/deb-src/s/^# //' /etc/apt/sources.list
# run update
RUN apt update
# install dev, dep and sources
RUN apt-get install -y --no-install-recommends fakeroot devscripts devscripts binutils wget
RUN apt-get build-dep -y openbox
COPY /openbox.title.patch .
RUN cat /etc/passwd
# Next command use $BUSER context
ENV BUSER builder
# RUN adduser --disabled-password --gecos '' $BUSER
# RUN id -u $BUSER &>/dev/null ||
RUN groupadd --gid 4096 $BUSER
RUN useradd --create-home --shell /bin/bash --uid 4096 -g $BUSER --groups sudo $BUSER
# hack: be shure to own the home dir
RUN chown -R $BUSER:$BUSER /home/$BUSER
USER $BUSER
RUN cd /home/$BUSER && apt-get source openbox
RUN ls -la /
RUN ls -la /home/$BUSER
# get patch
RUN cd /home/$BUSER/openbox-3.6.1 && patch -p2 < /openbox.title.patch
# dch --local abcdesktop_sig_usr
RUN cd /home/$BUSER/openbox-3.6.1 && dch -n abcdesktop_sig_usr
# dpkg-source --commit
RUN cd /home/$BUSER/openbox-3.6.1 && \
EDITOR=/bin/true dpkg-source -q --commit . abcdesktop_sig_usr
RUN cd /home/$BUSER/openbox-3.6.1 && \
debuild -us -uc
RUN ls -la /home/$BUSER/*.deb
USER root
RUN cp /home/$BUSER/*.deb /
# copy your new deb to the oc.user directory
# then rebuild your oc.user image