aboutsummaryrefslogtreecommitdiff
path: root/tcwg-base/tcwg-build/Dockerfile.in
blob: af36e90b6a98b47fc3263a2adbc6752cd6221064 (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
FROM linaro/ci-#{ARCH}-tcwg-base-ubuntu:#{DISTRO}

RUN while read line; do \
      if [ x"$(echo "$line" | cut -d: -f 4)" != x"9000" ]; then \
        continue; \
      fi; \
      new-user.sh --passwd "$line"; \
      user=$(echo "$line" | cut -d: -f 1); \
      sudo -i -u $user ccache -p; \
    done </home-data/passwd

# We create ccache directory as tcwg-buildslave, because otherwise
# "docker run -v ccache-volume:/home/tcwg-buildslave/.ccache" will create
# it owned by root:root, which will break builds.  We set ccache size:
# - 50G is a bare minimum to ccache the gnu/llvm builds
# - The aa64/amd64 build machines have enough disk to support 50G
# - TK1s have small disk, so try to get by with 10G.
RUN sudo -i -u tcwg-buildslave mkdir -p /home/tcwg-buildslave/.ccache \
#if ARCH_amd64 || ARCH_arm64
 && sudo -i -u tcwg-buildslave ccache -M 50G
#else
 && sudo -i -u tcwg-buildslave ccache -M 10G
#endif

#if ARCH_amd64
# Install wine.
RUN \
 apt-get update \
 && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
 wine-stable \
 && apt-get clean \
 && rm -rf \
 /var/lib/apt/lists/* \
 /tmp/* \
 /var/tmp/*
#endif

#if DISTRO_focal
# Add llvm 11 to get llvm-objdump with support for --disassemble-symbols.
# We need this in bmk-scripts.git/symbol_md5sum.sh.
RUN \
 apt-get update \
 && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
 llvm-11 \
 && apt-get clean \
 && rm -rf \
 /var/lib/apt/lists/* \
 /tmp/* \
 /var/tmp/* \
 # This will override llvm-objdump installed by tcwg-base's llvm package.
 && ln -s `which llvm-objdump-11` /usr/local/bin/llvm-objdump
#endif

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