mirror of
https://github.com/gravitational/teleport.git
synced 2026-09-24 16:17:11 +08:00
Remove CentOS 6 builds for Teleport 9
This commit is contained in:
committed by
Zac Bergquist
parent
93bc2d02a6
commit
eb487ce360
@@ -1,50 +0,0 @@
|
||||
# This Dockerfile makes the "build box": the container used to build official
|
||||
# releases of Teleport and its documentation.
|
||||
FROM centos:6
|
||||
|
||||
ENV LANGUAGE=en_US.UTF-8 \
|
||||
LANG=en_US.UTF-8 \
|
||||
LC_ALL=en_US.UTF-8 \
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
|
||||
# Replace regular CentOS 6 mirror list with vault.centos.org, as CentOS 6 is EOL
|
||||
# and regular mirrors aren't hosted any more.
|
||||
RUN sed -i 's%^mirrorlist%#mirrorlist%g' /etc/yum.repos.d/* && \
|
||||
sed -i 's%#baseurl=http://mirror.centos.org%baseurl=http://vault.centos.org%g' /etc/yum.repos.d/* && \
|
||||
yum makecache fast && \
|
||||
yum -y install gcc pam-devel glibc-devel net-tools tree git zip && \
|
||||
yum clean all
|
||||
|
||||
# Create /opt directory from pre-built assets of gcc and binutils. Both are
|
||||
# needed to build programs that use CGO starting with Go 1.17. See
|
||||
# Dockerfile-centos6-assets for more details.
|
||||
RUN cd / && curl -L https://s3.amazonaws.com/clientbuilds.gravitational.io/go/centos6-assets.tar.gz | tar -xz
|
||||
|
||||
ARG UID
|
||||
ARG GID
|
||||
RUN (groupadd ci --gid=$GID -o && useradd ci --uid=$UID --gid=$GID --create-home --shell=/bin/sh && \
|
||||
mkdir -p -m0700 /var/lib/teleport && chown -R ci /var/lib/teleport)
|
||||
|
||||
# Install etcd.
|
||||
RUN (curl -L https://github.com/coreos/etcd/releases/download/v3.3.9/etcd-v3.3.9-linux-amd64.tar.gz | tar -xz && \
|
||||
cp etcd-v3.3.9-linux-amd64/etcd* /bin/)
|
||||
|
||||
# Install Go.
|
||||
ARG RUNTIME
|
||||
RUN mkdir -p /opt && cd /opt && curl https://storage.googleapis.com/golang/$RUNTIME.linux-amd64.tar.gz | tar xz && \
|
||||
mkdir -p /go/src/github.com/gravitational/teleport && \
|
||||
chmod a+w /go && \
|
||||
chmod a+w /var/lib && \
|
||||
chmod a-w / && \
|
||||
/opt/go/bin/go version
|
||||
|
||||
ENV GOPATH="/go" \
|
||||
GOROOT="/opt/go" \
|
||||
PATH="/opt/bin:$PATH:/opt/go/bin:/go/bin:/go/src/github.com/gravitational/teleport/build"
|
||||
|
||||
# Install PAM module and policies for testing.
|
||||
COPY pam/ /opt/pam_teleport/
|
||||
RUN make -C /opt/pam_teleport install
|
||||
|
||||
VOLUME ["/go/src/github.com/gravitational/teleport"]
|
||||
EXPOSE 6600 2379 2380
|
||||
@@ -1,52 +0,0 @@
|
||||
# This Dockerfile creates build assets needed for CentOS 6 builds.
|
||||
#
|
||||
# Go 1.17 does not build programs that use CGO (like Teleport) with the
|
||||
# version of gcc (4.4.7) and ld (2.20) that CentOS 6 ships with.
|
||||
#
|
||||
# When you attempt to compile Teleport, you will run into the below error.
|
||||
#
|
||||
# cc1: error: unrecognized command line option "-fno-lto"
|
||||
#
|
||||
# Upgrading to gcc 4.8.5 will resolve that issue. However, Teleport still will
|
||||
# not compile, you will run into the below error.
|
||||
#
|
||||
# unrecognized relocation (0x2a) in section .text
|
||||
#
|
||||
# Which requires you to upgrade to ld 2.26.
|
||||
#
|
||||
# Because gcc can take hours to compile, this script is used to build and
|
||||
# package the needed versions of gcc and binutils so speed up Teleport builds.
|
||||
FROM centos:6
|
||||
|
||||
ENV LANGUAGE=en_US.UTF-8 \
|
||||
LANG=en_US.UTF-8 \
|
||||
LC_ALL=en_US.UTF-8 \
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
|
||||
# Replace regular CentOS 6 mirror list with vault.centos.org, as CentOS 6 is EOL
|
||||
# and regular mirrors aren't hosted any more.
|
||||
RUN sed -i 's%^mirrorlist%#mirrorlist%g' /etc/yum.repos.d/* && \
|
||||
sed -i 's%#baseurl=http://mirror.centos.org%baseurl=http://vault.centos.org%g' /etc/yum.repos.d/* && \
|
||||
yum makecache fast && \
|
||||
yum -y install gcc gcc-c++ glibc-devel glibc-devel.i686 net-tools tree git zip wget && \
|
||||
yum clean all
|
||||
|
||||
# Download, build, and install gcc.
|
||||
RUN mkdir -p /opt && cd /opt && curl -L https://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.gz | tar -xz && \
|
||||
cd gcc-4.8.5 && \
|
||||
./contrib/download_prerequisites && \
|
||||
./configure --prefix=/opt --enable-languages=c,c++ && \
|
||||
make && \
|
||||
make install && \
|
||||
rm -fr ../gcc-4.8.5
|
||||
|
||||
# Download, build, and install binuils.
|
||||
RUN mkdir -p /opt && cd /opt && curl -L https://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.gz | tar -xz && \
|
||||
cd binutils-2.26 && \
|
||||
./configure --prefix=/opt && \
|
||||
make && \
|
||||
make install && \
|
||||
rm -fr ../binutils-2.26
|
||||
|
||||
# Create the archive and copy it to the host.
|
||||
RUN tar -czvf centos6-assets.tar.gz /opt
|
||||
@@ -1,53 +0,0 @@
|
||||
# This Dockerfile makes the "build box": the container used to build official
|
||||
# releases of Teleport and its documentation.
|
||||
FROM centos:6
|
||||
|
||||
ENV LANGUAGE=en_US.UTF-8 \
|
||||
LANG=en_US.UTF-8 \
|
||||
LC_ALL=en_US.UTF-8 \
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
|
||||
# Replace regular CentOS 6 mirror list with vault.centos.org, as CentOS 6 is EOL
|
||||
# and regular mirrors aren't hosted any more.
|
||||
RUN sed -i 's%^mirrorlist%#mirrorlist%g' /etc/yum.repos.d/* && \
|
||||
sed -i 's%#baseurl=http://mirror.centos.org%baseurl=http://vault.centos.org%g' /etc/yum.repos.d/* && \
|
||||
yum makecache fast && \
|
||||
yum -y install gcc pam-devel glibc-devel net-tools tree git zip && \
|
||||
yum clean all
|
||||
|
||||
ARG UID
|
||||
ARG GID
|
||||
RUN (groupadd ci --gid=$GID -o && useradd ci --uid=$UID --gid=$GID --create-home --shell=/bin/sh && \
|
||||
mkdir -p -m0700 /var/lib/teleport && chown -R ci /var/lib/teleport)
|
||||
|
||||
# Install etcd.
|
||||
RUN (curl -L https://github.com/coreos/etcd/releases/download/v3.3.9/etcd-v3.3.9-linux-amd64.tar.gz | tar -xz && \
|
||||
cp etcd-v3.3.9-linux-amd64/etcd* /bin/)
|
||||
|
||||
# BoringCrypto (unlike regular Go) requires glibc 2.14, so we have to build from source.
|
||||
# 1) Install older binary Go runtime for bootstrapping
|
||||
# 2) Get source for the correct Go boringcrypto runtime and compile it with Go bootstrap runtime
|
||||
# 3) Erase Go bootstrap runtime and create build directories
|
||||
# 4) Print compiled Go version
|
||||
ARG BORINGCRYPTO_RUNTIME
|
||||
ARG GO_BOOTSTRAP_RUNTIME=go1.9.7
|
||||
RUN mkdir -p /go-bootstrap && cd /go-bootstrap && curl https://dl.google.com/go/${GO_BOOTSTRAP_RUNTIME}.linux-amd64.tar.gz | tar xz && \
|
||||
mkdir -p /opt && cd /opt && curl https://go-boringcrypto.storage.googleapis.com/${BORINGCRYPTO_RUNTIME}.src.tar.gz | tar xz && \
|
||||
cd /opt/go/src && GOROOT_BOOTSTRAP=/go-bootstrap/go ./make.bash && \
|
||||
rm -rf /go-bootstrap && \
|
||||
mkdir -p /go/src/github.com/gravitational/teleport && \
|
||||
chmod a+w /go && \
|
||||
chmod a+w /var/lib && \
|
||||
chmod a-w / && \
|
||||
/opt/go/bin/go version
|
||||
|
||||
ENV GOPATH="/go" \
|
||||
GOROOT="/opt/go" \
|
||||
PATH="$PATH:/opt/go/bin:/go/bin:/go/src/github.com/gravitational/teleport/build"
|
||||
|
||||
# Install PAM module and policies for testing.
|
||||
COPY pam/ /opt/pam_teleport/
|
||||
RUN make -C /opt/pam_teleport install
|
||||
|
||||
VOLUME ["/go/src/github.com/gravitational/teleport"]
|
||||
EXPOSE 6600 2379 2380
|
||||
@@ -36,7 +36,6 @@ GOGO_PROTO_TAG ?= v1.3.2
|
||||
|
||||
BUILDBOX=quay.io/gravitational/teleport-buildbox:$(RUNTIME)
|
||||
BUILDBOX_FIPS=quay.io/gravitational/teleport-buildbox-fips:$(RUNTIME)
|
||||
BUILDBOX_CENTOS6=quay.io/gravitational/teleport-buildbox-centos6:$(RUNTIME)
|
||||
BUILDBOX_CENTOS7=quay.io/gravitational/teleport-buildbox-centos7:$(RUNTIME)
|
||||
BUILDBOX_CENTOS7_FIPS=quay.io/gravitational/teleport-buildbox-centos7-fips:$(RUNTIME)
|
||||
BUILDBOX_ARM=quay.io/gravitational/teleport-buildbox-arm:$(RUNTIME)
|
||||
@@ -141,22 +140,6 @@ buildbox-fips:
|
||||
--tag $(BUILDBOX_FIPS) -f Dockerfile-fips . ; \
|
||||
fi
|
||||
|
||||
#
|
||||
# Builds a Docker buildbox for CentOS 6 builds
|
||||
#
|
||||
.PHONY:buildbox-centos6
|
||||
buildbox-centos6:
|
||||
@if [[ $${DRONE} == "true" ]] && ! docker inspect --type=image $(BUILDBOX_CENTOS6) 2>&1 >/dev/null; then docker pull $(BUILDBOX_CENTOS6) || true; fi;
|
||||
docker build \
|
||||
--build-arg UID=$(UID) \
|
||||
--build-arg GID=$(GID) \
|
||||
--build-arg RUNTIME=$(RUNTIME) \
|
||||
--cache-from $(BUILDBOX_CENTOS6) \
|
||||
--tag $(BUILDBOX_CENTOS6) -f Dockerfile-centos6 .
|
||||
|
||||
# CentOS 6 FIPS builds were removed in Teleport 7.0
|
||||
# https://github.com/gravitational/teleport/issues/7207
|
||||
|
||||
#
|
||||
# Builds a Docker buildbox for CentOS 7 builds
|
||||
#
|
||||
@@ -323,10 +306,6 @@ release-arm: buildbox-arm
|
||||
release-arm64: buildbox-arm
|
||||
$(MAKE) release ARCH=arm64 BUILDBOX_NAME=$(BUILDBOX_ARM)
|
||||
|
||||
.PHONY: release-amd64-centos6
|
||||
release-amd64-centos6: buildbox-centos6
|
||||
$(MAKE) release-centos6 ARCH=amd64
|
||||
|
||||
.PHONY: release-amd64-centos7
|
||||
release-amd64-centos7: buildbox-centos7
|
||||
$(MAKE) release-centos7 ARCH=amd64
|
||||
@@ -346,15 +325,6 @@ release-fips: buildbox-fips
|
||||
docker run $(DOCKERFLAGS) -i $(NOROOT) $(BUILDBOX_FIPS_NAME) \
|
||||
/usr/bin/make -C e release -e ADDFLAGS="$(ADDFLAGS)" OS=$(OS) ARCH=$(ARCH) RUNTIME=$(RUNTIME) FIPS=yes VERSION=$(VERSION) GITTAG=v$(VERSION) REPRODUCIBLE=yes
|
||||
|
||||
#
|
||||
# Create a Teleport package for CentOS 6 using the build container.
|
||||
# DELETE IN 9.0 (zmb3)
|
||||
#
|
||||
.PHONY:release-centos6
|
||||
release-centos6: buildbox-centos6
|
||||
docker run $(DOCKERFLAGS) -i $(NOROOT) $(BUILDBOX_CENTOS6) \
|
||||
/usr/bin/make release -e ADDFLAGS="$(ADDFLAGS)" OS=$(OS) ARCH=$(ARCH) RUNTIME=$(RUNTIME) REPRODUCIBLE=no
|
||||
|
||||
#
|
||||
# Create a Teleport package for CentOS 7 using the build container.
|
||||
#
|
||||
@@ -400,14 +370,6 @@ test-docs: docsbox
|
||||
docker run --platform=linux/amd64 -i $(NOROOT) -v $$(pwd)/..:/src/content $(DOCSBOX) \
|
||||
/bin/sh -c "yarn markdown-lint-external-links"
|
||||
|
||||
#
|
||||
# Builds assets needed by CentOS 6 in a container.
|
||||
#
|
||||
.PHONY:build-centos6-assets
|
||||
build-centos6-assets:
|
||||
docker build -t buildbox-centos6-assets -f Dockerfile-centos6-assets .
|
||||
docker run -v $$(pwd):/centos6.assets -it buildbox-centos6-assets cp /centos6-assets.tar.gz /centos6.assets
|
||||
|
||||
#
|
||||
# Print the Go version used to build Teleport.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user