mirror of
https://github.com/gravitational/teleport
synced 2024-10-19 16:53:57 +00:00
42c472af4a
* Removed node from multiarch buildbox, added i386, amd64 * Bump github.com/aws/aws-sdk-go-v2/service/sts from 1.18.3 to 1.18.5 (#22292) Bumps [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2) from 1.18.3 to 1.18.5. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.3...config/v1.18.5) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/sts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Added Dockerfile-multiarch Dockerfiles Signed-off-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com> Co-authored-by: Victor Sokolov <gzigzigzeo@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
125 lines
4 KiB
Plaintext
125 lines
4 KiB
Plaintext
# #############################################################################
|
|
# This image provides platform setup and GCC required for all platforms.
|
|
#
|
|
# 64-bit centos7 provides devtools-10 for arm64, devtools-11 for amd64 and
|
|
# gcc 4.8 for 32-bit archs. This image builds modern gcc from sources.
|
|
# It guarantees that we would use the same GCC version for all builds,
|
|
# and we would be able to upgrade GCC to a newer version if required.
|
|
# #############################################################################
|
|
|
|
FROM centos:7 AS base
|
|
|
|
# Automatically supplied by the Docker buildkit
|
|
ARG TARGETARCH
|
|
|
|
ARG GCC_VERSION=10.4.0
|
|
ARG CMAKE3_VERSION=3.12.3
|
|
|
|
# #############################################################################
|
|
# Platform-specific customisation.
|
|
# #############################################################################
|
|
|
|
## ARM 32 #####################################################################
|
|
FROM base AS platform-setup-arm
|
|
ENV GCC_BUILD_FLAGS="--build arm-unknown-linux-gnueabi --with-float=hard --with-mode=arm"
|
|
ENV GOLANG_ARCH=armv6l
|
|
ENV RUST_ARCH=armv7-unknown-linux-gnueabihf
|
|
|
|
RUN echo "armhfp" > /etc/yum/vars/basearch && \
|
|
echo "armv7hl" > /etc/yum/vars/arch && \
|
|
echo "armv7hl-redhat-linux-gnu" > /etc/rpm/platform
|
|
|
|
## ARM 64 #####################################################################
|
|
FROM base AS platform-setup-arm64
|
|
ENV GCC_BUILD_FLAGS="--build aarch64-unknown-linux-gnu"
|
|
ENV GOLANG_ARCH=arm64
|
|
ENV RUST_ARCH=aarch64-unknown-linux-gnu
|
|
|
|
# Installing the kerenel packages causes the update to hang on aarch64, so we
|
|
# skip upgrading them.
|
|
RUN echo "aarch64-redhat-linux-gnu" > /etc/rpm/platform
|
|
|
|
## 386 ########################################################################
|
|
FROM base AS platform-setup-386
|
|
ENV GCC_BUILD_FLAGS="--build i386-unknown-linux-gnu"
|
|
ENV GOLANG_ARCH=386
|
|
ENV RUST_ARCH=i686-unknown-linux-gnu
|
|
|
|
## AMD 64 #####################################################################
|
|
FROM base AS platform-setup-amd64
|
|
ENV GCC_BUILD_FLAGS="--build x86_64-unknown-linux-gnu"
|
|
ENV GOLANG_ARCH=amd64
|
|
ENV RUST_ARCH=x86_64-unknown-linux-gnu
|
|
|
|
## GCC built from sources #####################################################
|
|
FROM platform-setup-$TARGETARCH AS gcc
|
|
|
|
ENV LANGUAGE=en_US.UTF-8 \
|
|
LANG=en_US.UTF-8 \
|
|
LC_ALL=en_US.UTF-8 \
|
|
LC_CTYPE=en_US.UTF-8
|
|
|
|
RUN yum update -y && \
|
|
yum install -y \
|
|
autoconf-archive \
|
|
automake \
|
|
binutils \
|
|
bzip2 \
|
|
elfutils-libelf-devel-static \
|
|
file \
|
|
flex \
|
|
gcc \
|
|
gcc-c++ \
|
|
git \
|
|
glibc-devel \
|
|
glibc-static \
|
|
libstdc++-devel \
|
|
libstdc++-static \
|
|
libtool \
|
|
libudev-devel \
|
|
make \
|
|
pam-devel \
|
|
perl-IPC-Cmd \
|
|
texinfo \
|
|
wget \
|
|
which \
|
|
zip \
|
|
zlib-devel \
|
|
zlib-static && \
|
|
yum clean all && \
|
|
localedef -c -i en_US -f UTF-8 en_US.UTF-8
|
|
|
|
#tree \
|
|
# \
|
|
|
|
# Compile & install GCC
|
|
RUN wget https://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.gz && \
|
|
tar -zxvf gcc-${GCC_VERSION}.tar.gz && \
|
|
cd gcc-${GCC_VERSION} && \
|
|
./contrib/download_prerequisites && \
|
|
./configure --disable-checking --enable-languages=c,c++ --disable-multilib ${GCC_BUILD_FLAGS} || : && \
|
|
cat config.log && \
|
|
make -j$(nproc) && \
|
|
make install && \
|
|
cd .. && \
|
|
rm -rf gcc-${GCC_VERSION}.tar.gz gcc-${GCC_VERSION}
|
|
|
|
# Use the new compiler
|
|
ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib32:/usr/local/lib:$LD_LIBRARY_PATH
|
|
ENV CC=/usr/local/bin/gcc
|
|
ENV CXX=/usr/local/bin/g++
|
|
ENV PATH=/usr/local/bin:$PATH
|
|
|
|
# Install CMake3. CMake3 is required for most dependencies.
|
|
RUN wget https://cmake.org/files/v3.12/cmake-${CMAKE3_VERSION}.tar.gz && \
|
|
tar xzvf cmake-${CMAKE3_VERSION}.tar.gz && \
|
|
cd cmake-${CMAKE3_VERSION} && \
|
|
./bootstrap --prefix=/usr/local && \
|
|
make -j$(nproc) && \
|
|
make install && \
|
|
cd .. && \
|
|
rm -rf cmake-${CMAKE3_VERSION}.tar.gz cmake-${CMAKE3_VERSION}
|
|
|
|
# Provide cmake3 alias executable
|
|
RUN ln -s /usr/local/bin/cmake /usr/bin/cmake3
|