Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oracle linux 8 nightly #276

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions nightly-main/oraclelinux/8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
FROM oraclelinux:8
LABEL maintainer="Swift Infrastructure <[email protected]>"
LABEL description="Docker Container for the Swift programming language"

RUN yum install -y oracle-epel-release-el8

RUN yum install --enablerepo=ol8_codeready_builder -y \
binutils \
gcc \
git \
glibc-static \
libbsd-devel \
libcurl-devel \
libedit \
libedit-devel \
libicu-devel \
libstdc++-static \
libxml2-devel \
pkg-config \
python2 \
sqlite \
zlib-devel

RUN ln -s /usr/bin/python2 /usr/bin/python

# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little

# gpg --keyid-format LONG -k FAF6989E1BC16FEA
# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06]
# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
# uid [ unknown] Swift Automatic Signing Key #3 <[email protected]>
ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
ARG SWIFT_PLATFORM=oraclelinux
ARG OS_MAJOR_VER=8
ARG SWIFT_WEBROOT=https://download.swift.org/development

ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
SWIFT_PLATFORM=$SWIFT_PLATFORM \
OS_MAJOR_VER=$OS_MAJOR_VER \
OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER \
SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER"

RUN echo "${SWIFT_WEBROOT}/latest-build.yml"

RUN set -e; \
# - Latest Toolchain info
export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
&& echo $DOWNLOAD_DIR > .swift_tag \
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
&& export GNUPGHOME="$(mktemp -d)" \
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
# - Unpack the toolchain, set libs permissions, and clean up.
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
&& chmod -R o+r /usr/lib/swift \
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz

# Print Installed Swift Version
RUN swift --version

RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \
>> /etc/bashrc; \
echo -e " ################################################################\n" \
"#\t\t\t\t\t\t\t\t#\n" \
"# Swift Nightly Docker Image\t\t\t\t\t#\n" \
"# Tag: $(cat .swift_tag)\t\t\t#\n" \
"#\t\t\t\t\t\t\t\t#\n" \
"################################################################\n" > /etc/motd
81 changes: 81 additions & 0 deletions nightly-main/oraclelinux/8/buildx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
FROM oraclelinux:8 AS base
LABEL maintainer="Swift Infrastructure <[email protected]>"
LABEL description="Docker Container for the Swift programming language"

RUN yum install -y oracle-epel-release-el8

RUN yum install --enablerepo=ol8_codeready_builder -y \
binutils \
gcc \
git \
glibc-static \
libbsd-devel \
libcurl-devel \
libedit \
libedit-devel \
libicu-devel \
libstdc++-static \
libxml2-devel \
pkg-config \
python2 \
sqlite \
zlib-devel

RUN ln -s /usr/bin/python2 /usr/bin/python

# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little

# gpg --keyid-format LONG -k FAF6989E1BC16FEA
# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06]
# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
# uid [ unknown] Swift Automatic Signing Key #3 <[email protected]>
ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
ARG SWIFT_PLATFORM=oraclelinux
ARG OS_MAJOR_VER=8
ARG SWIFT_WEBROOT=https://download.swift.org/development

# This is a small trick to enable if/else for arm64 and amd64.
# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options.
FROM base AS base-amd64
ARG OS_ARCH_SUFFIX=
ARG ADDITIONAL_TAR_OPTIONS="--strip-components=1"

FROM base AS base-arm64
ARG OS_ARCH_SUFFIX=-aarch64
ARG ADDITIONAL_TAR_OPTIONS=

FROM base-$TARGETARCH AS final

ARG OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER$OS_ARCH_SUFFIX
ARG PLATFORM_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_ARCH_SUFFIX"

RUN echo "${PLATFORM_WEBROOT}/latest-build.yml"

RUN set -e; \
# - Latest Toolchain info
export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
&& export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
&& echo $DOWNLOAD_DIR > .swift_tag \
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
&& export GNUPGHOME="$(mktemp -d)" \
&& curl -fsSL ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
# - Unpack the toolchain, set libs permissions, and clean up.
&& tar -xzf latest_toolchain.tar.gz --directory / ${ADDITIONAL_TAR_OPTIONS} \
&& chmod -R o+r /usr/lib/swift \
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz

# Print Installed Swift Version
RUN swift --version

RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \
>> /etc/bashrc; \
echo -e " ################################################################\n" \
"#\t\t\t\t\t\t\t\t#\n" \
"# Swift Nightly Docker Image\t\t\t\t\t#\n" \
"# Tag: $(cat .swift_tag)\t\t\t#\n" \
"#\t\t\t\t\t\t\t\t#\n" \
"################################################################\n" > /etc/motd
48 changes: 48 additions & 0 deletions nightly-main/oraclelinux/8/slim/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FROM oraclelinux:8
LABEL maintainer="Swift Infrastructure <[email protected]>"
LABEL description="Docker Container for the Swift programming language"

# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little

# gpg --keyid-format LONG -k FAF6989E1BC16FEA
# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06]
# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
# uid [ unknown] Swift Automatic Signing Key #3 <[email protected]>
ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
ARG SWIFT_PLATFORM=oraclelinux
ARG OS_MAJOR_VER=8
ARG SWIFT_WEBROOT=https://download.swift.org/development

ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
SWIFT_PLATFORM=$SWIFT_PLATFORM \
OS_MAJOR_VER=$OS_MAJOR_VER \
OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER \
SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER"

RUN echo "${SWIFT_WEBROOT}/latest-build.yml"

RUN set -e; \
# - Latest Toolchain info
export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
&& echo $DOWNLOAD_DIR > .swift_tag \
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
&& export GNUPGHOME="$(mktemp -d)" \
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
# - Unpack the toolchain, set libs permissions, and clean up.
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 ${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \
&& chmod -R o+r /usr/lib/swift \
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz

RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \
>> /etc/bashrc; \
echo -e " ################################################################\n" \
"#\t\t\t\t\t\t\t\t#\n" \
"# Swift Nightly Docker Image\t\t\t\t\t#\n" \
"# Tag: $(cat .swift_tag)\t\t\t#\n" \
"#\t\t\t\t\t\t\t\t#\n" \
"################################################################\n" > /etc/motd
45 changes: 45 additions & 0 deletions swift-ci/master/oraclelinux/8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FROM oraclelinux:8

RUN groupadd -g 42 build-user && \
useradd -m -r -u 42 -g build-user build-user

RUN yum install -y oracle-epel-release-el8

RUN yum install --enablerepo=ol8_codeready_builder -y \
autoconf \
clang-12.0.1 \
cmake \
diffutils \
git \
glibc-static \
libbsd-devel \
libcurl-devel \
libedit-devel \
libicu-devel \
libstdc++-static \
libtool \
libuuid-devel \
libxml2-devel \
make \
ncurses-devel \
ninja-build \
pcre-devel \
procps-ng \
python2 \
python2-devel \
python2-six \
python3 \
python3-six \
python3-pexpect \
platform-python-devel \
sqlite-devel \
swig \
rsync \
tar \
which

RUN ln -s /usr/bin/python2 /usr/bin/python

USER build-user

WORKDIR /home/build-user