-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
79 lines (61 loc) · 2.33 KB
/
Dockerfile
File metadata and controls
79 lines (61 loc) · 2.33 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# This Dockefile generate a image for the elbe buildsystem
#
# tested with elbe-v0.5.5-13-gad384e9
# baseimage is ubuntu precise (LTS)
FROM ubuntu:bionic
# Maintainer
MAINTAINER Silvio F. <silvio@port1024.net>
# set debian/ubuntu config environment to noninteractive
ENV DEBIAN_FRONTEND noninteractive
# setup the initsystem
RUN dpkg-divert --local --rename --add /sbin/initctl && ln -sf /bin/true /sbin/initctl
# change some location settings
RUN ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
# update and upgrade
RUN apt-get update -y && apt-get upgrade -y
# development base installation
RUN apt-get install -y git build-essential openssh-server vim supervisor \
gawk wget diffstat unzip texinfo chrpath libsdl1.2-dev \
xterm python2.7 cpio flex bison gettext dialog autoconf \
libxml-parser-perl lzop bc file python-git \
dnsmasq dnsutils sudo \
aptitude tig mercurial-git \
gcc-multilib g++-multilib libc6-dev dpkg locales \
libdbus-glib-1-dev rsync git-lfs socat
# Set up locales
RUN apt-get -y install locales apt-utils sudo && dpkg-reconfigure locales && locale-gen en_US.UTF-8 && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
ENV LANG en_US.utf8
# clean up
RUN apt-get clean
# additions
ADD adds/supervisord.conf /etc/supervisord.conf
# create oe user
RUN groupadd -g 1000 oe
RUN useradd -d /oe-home -g oe -m -s /bin/bash -u 1000 oe
RUN echo "root:foo" | chpasswd
RUN echo "oe:foo" | chpasswd
# sudo for oe
RUN echo "%oe ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/oegrp
RUN chmod 0440 /etc/sudoers.d/oegrp
# some filesystem bugfixes
RUN grep -vF -e rootfs -e devpts /proc/mounts > /etc/mtab ; true
# some dns thingies
RUN echo "addn-hosts=/etc/althosts" >> /etc/dnsmasq.conf
RUN echo "user=root" >> /etc/dnsmasq.conf
# secure back channel
RUN cd /oe-home ; \
git clone https://github.com/turicas/sbc.git ;\
cp sbc/sbc /usr/local/bin ;\
mkdir .sbc ;\
cp -a sbc/plugins .sbc
ADD adds/sbc-notify.sh /usr/local/bin/sbc-notify.sh
RUN chmod a+x /usr/local/bin/sbc-notify.sh
# correction for filesystems
RUN ln -sf /bin/bash /bin/sh
# repo tool
ADD http://commondatastorage.googleapis.com/git-repo-downloads/repo /usr/local/bin/repo
RUN chmod a+rx /usr/local/bin/repo
# ssh and startup configuration
RUN mkdir -v /var/run/sshd
CMD ["/usr/sbin/sshd", "-D"]
EXPOSE 22