-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for CentOS 6 builds in Docker (#3175)
- Loading branch information
Showing
3 changed files
with
142 additions
and
3 deletions.
There are no files selected for viewing
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,48 @@ | ||
# This Dockerfile makes the "build box": the container used to build official | ||
# releases of Teleport and its documentation. | ||
FROM centos:6 | ||
|
||
ARG UID | ||
ARG GID | ||
ARG GO_BOOTSTRAP_RUNTIME=go1.9.7 | ||
|
||
ENV LANGUAGE=en_US.UTF-8 | ||
ENV LANG=en_US.UTF-8 | ||
ENV LC_ALL=en_US.UTF-8 | ||
ENV LC_CTYPE=en_US.UTF-8 | ||
|
||
COPY pam/pam_teleport.so /lib/x86_64-linux-gnu/security | ||
COPY pam/teleport-acct-failure /etc/pam.d | ||
COPY pam/teleport-session-failure /etc/pam.d | ||
COPY pam/teleport-success /etc/pam.d | ||
|
||
RUN yum makecache fast && yum -y install gcc pam-devel glibc-devel net-tools tree git zip && yum clean all | ||
|
||
RUN (groupadd jenkins --gid=$GID -o && useradd jenkins --uid=$UID --gid=$GID --create-home --shell=/bin/sh ;\ | ||
mkdir -p /var/lib/teleport && chown -R jenkins /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/) | ||
|
||
# 1) Install 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 RUNTIME | ||
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://dl.google.com/go/${RUNTIME}.src.tar.gz | tar xz && \ | ||
cd /opt/go/src && GOROOT_BOOTSTRAP=/go-bootstrap/go ./make.bash && \ | ||
rm -rf /go-bootstrap && \ | ||
mkdir -p /gopath/src/github.com/gravitational/teleport && \ | ||
chmod a+w /gopath && \ | ||
chmod a+w /var/lib && \ | ||
chmod a-w / && \ | ||
/opt/go/bin/go version | ||
|
||
ENV GOPATH="/gopath" \ | ||
GOROOT="/opt/go" \ | ||
PATH="$PATH:/opt/go/bin:/gopath/bin:/gopath/src/github.com/gravitational/teleport/build" | ||
|
||
VOLUME ["/gopath/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,49 @@ | ||
# This Dockerfile makes the "build box": the container used to build official | ||
# releases of Teleport and its documentation. | ||
FROM centos:6 | ||
|
||
ARG UID | ||
ARG GID | ||
ARG GO_BOOTSTRAP_RUNTIME=go1.9.7 | ||
|
||
ENV LANGUAGE=en_US.UTF-8 | ||
ENV LANG=en_US.UTF-8 | ||
ENV LC_ALL=en_US.UTF-8 | ||
ENV LC_CTYPE=en_US.UTF-8 | ||
|
||
COPY pam/pam_teleport.so /lib/x86_64-linux-gnu/security | ||
COPY pam/teleport-acct-failure /etc/pam.d | ||
COPY pam/teleport-session-failure /etc/pam.d | ||
COPY pam/teleport-success /etc/pam.d | ||
|
||
RUN yum makecache fast && yum -y install gcc pam-devel glibc-devel net-tools tree git zip && yum clean all | ||
|
||
RUN (groupadd jenkins --gid=$GID -o && useradd jenkins --uid=$UID --gid=$GID --create-home --shell=/bin/sh ;\ | ||
mkdir -p /var/lib/teleport && chown -R jenkins /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/) | ||
|
||
# 1) Install 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 RUNTIME | ||
#RUN mkdir -p /go-bootstrap && cd /go-bootstrap && curl https://go-boringcrypto.storage.googleapis.com/${GO_BOOTSTRAP_RUNTIME}b4.linux-amd64.tar.gz | tar xz && \ | ||
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/${RUNTIME}b4.src.tar.gz | tar xz && \ | ||
cd /opt/go/src && GOROOT_BOOTSTRAP=/go-bootstrap/go ./make.bash && \ | ||
rm -rf /go-bootstrap && \ | ||
mkdir -p /gopath/src/github.com/gravitational/teleport && \ | ||
chmod a+w /gopath && \ | ||
chmod a+w /var/lib && \ | ||
chmod a-w / && \ | ||
/opt/go/bin/go version | ||
|
||
ENV GOPATH="/gopath" \ | ||
GOROOT="/opt/go" \ | ||
PATH="$PATH:/opt/go/bin:/gopath/bin:/gopath/src/github.com/gravitational/teleport/build" | ||
|
||
VOLUME ["/gopath/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