-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.gcc9builder
44 lines (36 loc) · 1.7 KB
/
Dockerfile.gcc9builder
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
#
# Dockerfile to create the builder container for compiling and testing Universal
# docker build --target gcc9builder -t lemurianlabs/builders:gcc9builder -f Dockerfile.gcc9builder .
# then push to docker hub
# docker push lemurianlabs/builders:gcc9builder
# BUILDER stage
FROM gcc:9.5 as gcc9builder
LABEL Theodore Omtzigt
# create a build environment
RUN apt-get update && apt-get install -y --no-install-recommends -V \
apt-utils \
build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# install a specific cmake version
RUN set -ex \
&& for key in C6C265324BBEBDC350B513D02D2CEF1034921684; do \
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys "$key" ; \
done
ENV CMAKE_DIR v3.23
ENV CMAKE_VERSION 3.23.1
RUN set -ex \
&& curl -fsSLO --compressed https://cmake.org/files/${CMAKE_DIR}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz \
&& curl -fsSLO https://cmake.org/files/${CMAKE_DIR}/cmake-${CMAKE_VERSION}-SHA-256.txt.asc \
&& curl -fsSLO https://cmake.org/files/${CMAKE_DIR}/cmake-${CMAKE_VERSION}-SHA-256.txt \
&& gpg --verify cmake-${CMAKE_VERSION}-SHA-256.txt.asc cmake-${CMAKE_VERSION}-SHA-256.txt \
&& grep "cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz\$" cmake-${CMAKE_VERSION}-SHA-256.txt | sha256sum -c - \
&& tar xzf cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz -C /usr/local --strip-components=1 --no-same-owner \
&& rm -rf cmake-${CMAKE_VERSION}*
# create and use user lemurianlabs
RUN useradd -ms /bin/bash lemurianlabs
USER lemurianlabs
WORKDIR /home/lemurianlabs
# add a command that when you run the container without a command, it produces something meaningful
ENV CONTAINER_ID "Lemurian Labs Builder GCC 9.5"
CMD ["/usr/bin/env", "bash"]