aboutsummaryrefslogtreecommitdiff
path: root/tcwg-base/Dockerfile.in
blob: dd5dc1fb5ce6a99bf87005b6e71f4a5c32c47a23 (plain)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#if ARCH_amd64
FROM ubuntu:#{DISTRO}
#elif DISTRO_zesty
FROM snapcraft/zesty-#{ARCH}:latest
#else
FROM linaro/base-#{ARCH}-ubuntu:#{DISTRO}
#endif

#if ARCH_amd64 || ARCH_i386
RUN (url="http://archive.ubuntu.com/ubuntu/"; \
#else
RUN (url="http://ports.ubuntu.com/ubuntu-ports/"; \
#endif
 ubuntu=#{DISTRO}; \
 for i in $ubuntu $ubuntu-updates $ubuntu-backports $ubuntu-security; do \
   for j in deb deb-src; do \
     echo "$j $url $i main restricted universe multiverse"; \
   done; \
   echo; \
 done) > /etc/apt/sources.list \
#if ARCH_amd64
 && dpkg --add-architecture i386 \
#endif
 && apt-get update \
 && DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y \
#if ARCH_i386
 && dpkg-divert --local --rename --add /sbin/initctl \
 && ln -s /bin/true /sbin/initctl \
#endif
 && DEBIAN_FRONTEND=noninteractive apt-get install -y devscripts \
 && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
 alien \
 autoconf \
 autogen \
 automake \
 bc \
 bison \
#if ARCH_amd64 || ARCH_i386
 binutils-aarch64-linux-gnu \
 binutils-arm-linux-gnueabihf \
#endif
 build-essential \
 byacc \
 ccache \
 ccrypt \
 chrpath \
 clang \
 cmake \
 debhelper \
 dejagnu \
 dh-autoreconf \
 dh-translations \
 distro-info-data \
 emacs \
 fakeroot \
 flex \
#if ARCH_amd64 || ARCH_i386
 g++-multilib \
#endif
 gawk \
 gdb \
 gdbserver \
 git \
 groff \
 libexpat1-dev \
#if ARCH_amd64 || ARCH_i386
 libglib2.0-dev \
#endif
 liblzma-dev \
 libncurses5-dev \
 libpython2.7-dev \
 libreadline-dev \
 libssl-dev \
 libtcnative-1 \
 libtool \
 linux-tools-generic \
 lzop \
 make \
#if ARCH_amd64 || ARCH_i386
 mingw-w64 \
# if DISTRO_trusty
 mingw32 \
# endif
#endif
 net-tools \
 netcat \
 ninja-build \
#if DISTRO_trusty
 openjdk-7-jdk \
#else
 openjdk-8-jdk \
#endif
 openssh-server \
#if ARCH_amd64 || ARCH_i386
 pkg-config \
#endif
 python-dev \
#if DISTRO_trusty
 python-virtualenv \
#endif
 pxz \
 qemu-user \
 rsync \
 subversion \
 sudo \
 tclsh \
 texinfo \
 texlive-fonts-recommended \
 texlive-latex-recommended \
 time \
 valgrind \
 vim \
#if !DISTRO_trusty
 virtualenv \
#endif
 wget \
#if ARCH_amd64 || ARCH_i386
 wine \
#endif
 xz-utils \
 zip \
 zlib1g-dev \
 && apt-get clean \
 && rm -rf \
 /var/lib/apt/lists/* \
 /tmp/* \
 /var/tmp/*

RUN install -D -p -m0755 /usr/share/doc/git/contrib/workdir/git-new-workdir /usr/local/bin/git-new-workdir \
 && sed -i -e 's:^session *required *pam_loginuid.so:# session required pam_loginuid.so:' /etc/pam.d/sshd \
 && mkdir -p /var/run/sshd \
 && sed -i \
 -e "/.*MaxStartups.*/d" \
 -e "/.*MaxSesssions.*/d" /etc/ssh/sshd_config \
 && echo "MaxStartups 256" >> /etc/ssh/sshd_config \
 && echo "MaxSessions 256" >> /etc/ssh/sshd_config

#if ARCH_amd64 || ARCH_i386
RUN mkdir /tmp/docker-install-qemu.$$ \
 && cd /tmp/docker-install-qemu.$$ \
 && qemu_ver=2.8.0 && wget --progress=dot:giga http://download.qemu-project.org/qemu-${qemu_ver}.tar.xz \
 && tar xf qemu-${qemu_ver}.tar.xz \
 && mkdir build && cd build \
 && ../qemu-${qemu_ver}/configure --prefix=/usr/local --target-list=armeb-linux-user \
 && make all install -j $(nproc --all) \
 && cd && rm -rf /tmp/docker-install-qemu.$$

#endif
# We use ssh multiplexing, which creates sockets in /tmp.  Overlayfs,
# which docker is using, can't host sockets, so we use a scratch mount
# for /tmp.  This requires that we add --rm option to "docker run"
# invocations (e.g., mark "Remove volumes" checkbox in docker plugin) to
# cleanup host directories used for the scratch mounts.
VOLUME /tmp

EXPOSE 22
#if ARCH_amd64 || ARCH_arm64
CMD ["/usr/sbin/sshd", "-D"]
#else
CMD ["linux32", "/usr/sbin/sshd", "-D"]
#endif