forked from Yubico/developers.yubico.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.build
More file actions
59 lines (51 loc) · 1.83 KB
/
Dockerfile.build
File metadata and controls
59 lines (51 loc) · 1.83 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
FROM ubuntu:18.04
# UNIVERSAL APT-GET (FOR X86 AND ARM)
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then \
# This is the x86 active repository
echo "deb http://archive.ubuntu.com/ubuntu/ bionic main universe" > /etc/apt/sources.list && \
echo "deb http://archive.ubuntu.com/ubuntu/ bionic-updates main universe" >> /etc/apt/sources.list && \
echo "deb http://archive.ubuntu.com/ubuntu/ bionic-security main universe" >> /etc/apt/sources.list; \
elif [ "$ARCH" = "aarch64" ]; then \
# This is the ARM active repository
echo "deb http://ports.ubuntu.com/ubuntu-ports/ bionic main universe" > /etc/apt/sources.list && \
echo "deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main universe" >> /etc/apt/sources.list && \
echo "deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main universe" >> /etc/apt/sources.list; \
else \
echo "Unsupported architecture: $ARCH" && exit 1; \
fi \
# Clean up, update, and install in one go
&& rm -f /etc/apt/sources.list.d/* \
&& apt-get -y update \
&& apt-get -y dist-upgrade \
&& apt-get install --no-install-recommends -y \
git \
git-lfs \
openssh-client \
python-pip \
python-setuptools \
asciidoc \
mscgen \
libffi-dev \
libssl-dev \
source-highlight \
&& rm -rf /var/lib/apt/lists/*
# PYTHON SETUP
# Added setuptools/wheel for robustness
COPY requirements.txt /
COPY pipcache/*.gz /
COPY generate_sitemap.py /generate_sitemap.py
RUN pip install --upgrade pip setuptools wheel
RUN pip install -r /requirements.txt
# USER SETUP
ARG uid
ARG gid
RUN groupmod -g 9000 dialout
RUN addgroup --gid $gid build
RUN adduser --home /home/build --shell /bin/bash --disabled-login --gecos '' \
--uid $uid --gid $gid \
build
USER build
VOLUME /developers
WORKDIR /developers
CMD ["./build"]