forked from commaai/agnos-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.builder
35 lines (29 loc) · 936 Bytes
/
Dockerfile.builder
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
FROM ubuntu:20.04
ARG UNAME
ARG UID
ARG GID
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python2 \
build-essential \
libssl-dev \
bc \
python-is-python2 \
openssl \
ccache \
android-sdk-libsparse-utils \
&& rm -rf /var/lib/apt/lists/*
RUN if [ ${UID:-0} -ne 0 ] && [ ${GID:-0} -ne 0 ]; then \
userdel -r `getent passwd ${UID} | cut -d : -f 1` > /dev/null 2>&1; \
groupdel -f `getent group ${GID} | cut -d : -f 1` > /dev/null 2>&1; \
groupadd -g ${GID} -o ${UNAME} && \
useradd -u $UID -g $GID ${UNAME} \
;fi
RUN CCACHE_PATH=$(which ccache) && \
ln -s $CCACHE_PATH /usr/local/bin/gcc && \
ln -s $CCACHE_PATH /usr/local/bin/g++ && \
ln -s $CCACHE_PATH /usr/local/bin/cc && \
ln -s $CCACHE_PATH /usr/local/bin/c++ && \
ln -s $CCACHE_PATH /usr/local/bin/clang
ENTRYPOINT ["tail", "-f", "/dev/null"]