-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create separate builds for CentOS7 (+fips)
Add new buildboxes for centos7 and centos7-fips. For now, we will continue to support both CentOS 6 and 7. Eventually we will drop support for CentOS 6, and the only supported CentOS builds will be these new CentOS 7 builds. Fixes #9028
- Loading branch information
Showing
10 changed files
with
553 additions
and
111 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
FROM centos:7 | ||
|
||
ENV LANGUAGE=en_US.UTF-8 \ | ||
LANG=en_US.UTF-8 \ | ||
LC_ALL=en_US.UTF-8 \ | ||
LC_CTYPE=en_US.UTF-8 | ||
|
||
ARG RUNTIME | ||
ARG RUST_VERSION | ||
|
||
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 dev tools (make, etc) and a Perl package needed to build OpenSSL. | ||
RUN yum groupinstall -y "Development Tools" | ||
RUN yum install -y pam-devel net-tools tree git zip perl-IPC-Cmd && \ | ||
yum clean all | ||
|
||
# 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. | ||
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 && \ | ||
/opt/go/bin/go version | ||
|
||
# Install PAM module and policies for testing. | ||
COPY pam/ /opt/pam_teleport/ | ||
RUN make -C /opt/pam_teleport install | ||
|
||
# Install Rust. | ||
ENV RUSTUP_HOME=/usr/local/rustup \ | ||
CARGO_HOME=/usr/local/cargo \ | ||
PATH=/usr/local/cargo/bin:$PATH \ | ||
RUST_VERSION=$RUST_VERSION | ||
|
||
RUN mkdir -p $RUSTUP_HOME && chmod a+w $RUSTUP_HOME && \ | ||
mkdir -p $CARGO_HOME/registry && chmod -R a+w $CARGO_HOME | ||
|
||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain $RUST_VERSION && \ | ||
rustup --version && \ | ||
cargo --version && \ | ||
rustc --version && \ | ||
rustup component add --toolchain $RUST_VERSION-x86_64-unknown-linux-gnu rustfmt clippy && \ | ||
chmod -R a+w $RUSTUP_HOME $CARGO_HOME && \ | ||
cargo install cbindgen | ||
|
||
ENV GOPATH="/go" \ | ||
GOROOT="/opt/go" \ | ||
PATH="/opt/bin:$PATH:/opt/go/bin:/go/bin:/go/src/github.com/gravitational/teleport/build" | ||
|
||
RUN chmod a-w / | ||
|
||
VOLUME ["/go/src/github.com/gravitational/teleport"] | ||
EXPOSE 6600 2379 2380 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
FROM centos:7 | ||
|
||
ENV LANGUAGE=en_US.UTF-8 \ | ||
LANG=en_US.UTF-8 \ | ||
LC_ALL=en_US.UTF-8 \ | ||
LC_CTYPE=en_US.UTF-8 | ||
|
||
ARG RUST_VERSION | ||
ARG BORINGCRYPTO_RUNTIME | ||
ARG GO_BOOTSTRAP_RUNTIME=go1.9.7 | ||
|
||
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 dev tools (make, etc) and a Perl package needed to build OpenSSL. | ||
RUN yum groupinstall -y "Development Tools" | ||
RUN yum install -y pam-devel net-tools tree git zip perl-IPC-Cmd && \ | ||
yum clean all | ||
|
||
# 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 | ||
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 | ||
|
||
# Install PAM module and policies for testing. | ||
COPY pam/ /opt/pam_teleport/ | ||
RUN make -C /opt/pam_teleport install | ||
|
||
# Install Rust. | ||
ENV RUSTUP_HOME=/usr/local/rustup \ | ||
CARGO_HOME=/usr/local/cargo \ | ||
PATH=/usr/local/cargo/bin:$PATH \ | ||
RUST_VERSION=$RUST_VERSION | ||
|
||
RUN mkdir -p $RUSTUP_HOME && chmod a+w $RUSTUP_HOME && \ | ||
mkdir -p $CARGO_HOME/registry && chmod -R a+w $CARGO_HOME | ||
|
||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain $RUST_VERSION && \ | ||
rustup --version && \ | ||
cargo --version && \ | ||
rustc --version && \ | ||
rustup component add --toolchain $RUST_VERSION-x86_64-unknown-linux-gnu rustfmt clippy && \ | ||
chmod -R a+w $RUSTUP_HOME $CARGO_HOME && \ | ||
cargo install cbindgen | ||
|
||
ENV GOPATH="/go" \ | ||
GOROOT="/opt/go" \ | ||
PATH="/opt/bin:$PATH:/opt/go/bin:/go/bin:/go/src/github.com/gravitational/teleport/build" | ||
|
||
RUN chmod a-w / | ||
|
||
VOLUME ["/go/src/github.com/gravitational/teleport"] | ||
EXPOSE 6600 2379 2380 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.