Skip to content

Commit

Permalink
Merge pull request #3 from wlisac/swift-5.0.1
Browse files Browse the repository at this point in the history
Add Swift 5.0.1 for ARMv6 and ARMv7
  • Loading branch information
wlisac authored Jun 29, 2019
2 parents 531aefd + b67f47b commit 39010b4
Show file tree
Hide file tree
Showing 15 changed files with 800 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# wlisac/armv7hf-debian-swift:5.0.1-stretch

ARG BASE_IMAGE=balenalib/armv7hf-debian:stretch

# Download and decompress the tarball into an intermediate container
# to improve cache accross different base image variations

FROM balenalib/armv7hf-debian:stretch as downloader

LABEL Description="Swift Downloader"

ARG TARBALL_URL=https://github.com/uraimo/buildSwiftOnARM/releases/download/5.0.1/swift-5.0.1-RPi0123-RaspbianStretch.tgz
ARG TARBALL_FILE=swift.tgz

WORKDIR /swift

RUN curl -L -o $TARBALL_FILE $TARBALL_URL \
&& tar -xvzf $TARBALL_FILE -C /swift \
&& rm $TARBALL_FILE

# Create base image

FROM "$BASE_IMAGE"

LABEL maintainer "Will Lisac <will@lisac.org>"
LABEL Description="Docker Container for Swift on Balena"

# Started with dependencies from official Swift Dockerfile for Swift 5.0 on Ubuntu 16.04
# https://github.com/apple/swift-docker/blob/6812f217b405a5101ea3e8fce4d1cf09e3c8727b/5.0/ubuntu/16.04/Dockerfile

# Needed to add clang (not clang-3.8)
# https://github.com/uraimo/buildSwiftOnARM/blob/1be3c13d709724b48b418c6511a38c8f323378ec/README.md#dependencies

# Also, I was getting "Unable to locate package libgcc-5-dev" and "Unable to locate package libstdc++-5-dev"
# from the raw armv7hf base image.
# I just removed these explicit dependencies since clang includes newer versions anyway.
# https://forums.swift.org/t/which-clang-package-should-we-install/20542/7
# Upgrading to libgcc-6-dev and libstdc++-6-dev explicitly would also be fine.

RUN install_packages \
libatomic1 \
libbsd0 \
libcurl3 \
libxml2 \
libedit2 \
libsqlite3-0 \
libc6-dev \
binutils \
libpython2.7 \
tzdata \
git \
pkg-config \
clang

# Copy files from downloader to root
COPY --from=downloader /swift /

RUN swift --version
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# wlisac/armv7hf-ubuntu-swift:5.0.1-bionic

ARG BASE_IMAGE=balenalib/armv7hf-ubuntu:bionic

# Download and decompress the tarball into an intermediate container
# to improve cache accross different base image variations

FROM balenalib/armv7hf-ubuntu:bionic as downloader

LABEL Description="Swift Downloader"

ARG TARBALL_URL=https://github.com/uraimo/buildSwiftOnARM/releases/download/5.0.1/swift-5.0.1-RPi23-Ubuntu1804.tgz
ARG TARBALL_FILE=swift.tgz

WORKDIR /swift

RUN curl -L -o $TARBALL_FILE $TARBALL_URL \
&& tar -xvzf $TARBALL_FILE -C /swift \
&& rm $TARBALL_FILE

# Create base image

FROM "$BASE_IMAGE"

LABEL maintainer "Will Lisac <will@lisac.org>"
LABEL Description="Docker Container for Swift on Balena"

# Dependencies from official Swift Dockerfile for Swift 5.0 on Ubuntu 18.04
# https://github.com/apple/swift-docker/blob/6812f217b405a5101ea3e8fce4d1cf09e3c8727b/5.0/ubuntu/18.04/Dockerfile

# Needed to add clang
# https://github.com/uraimo/buildSwiftOnARM/blob/1be3c13d709724b48b418c6511a38c8f323378ec/README.md#dependencies

RUN install_packages \
libatomic1 \
libbsd0 \
libcurl4 \
libxml2 \
libedit2 \
libsqlite3-0 \
libc6-dev \
binutils \
libgcc-5-dev \
libstdc++-5-dev \
libpython2.7 \
tzdata \
git \
pkg-config \
clang

# Copy files from downloader to root
COPY --from=downloader /swift /

RUN swift --version
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# wlisac/armv7hf-ubuntu-swift:5.0.1-xenial

ARG BASE_IMAGE=balenalib/armv7hf-ubuntu:xenial

# Download and decompress the tarball into an intermediate container
# to improve cache accross different base image variations

FROM balenalib/armv7hf-ubuntu:xenial as downloader

LABEL Description="Swift Downloader"

ARG TARBALL_URL=https://github.com/uraimo/buildSwiftOnARM/releases/download/5.0.1/swift-5.0.1-RPi23-Ubuntu1604.tgz
ARG TARBALL_FILE=swift.tgz

WORKDIR /swift

RUN curl -L -o $TARBALL_FILE $TARBALL_URL \
&& tar -xvzf $TARBALL_FILE -C /swift \
&& rm $TARBALL_FILE

# Create base image

FROM "$BASE_IMAGE"

LABEL maintainer "Will Lisac <will@lisac.org>"
LABEL Description="Docker Container for Swift on Balena"

# Dependencies from official Swift Dockerfile for Swift 5.0 on Ubuntu 16.04
# https://github.com/apple/swift-docker/blob/6812f217b405a5101ea3e8fce4d1cf09e3c8727b/5.0/ubuntu/16.04/Dockerfile

# Needed to add clang (not clang-3.8)
# https://github.com/uraimo/buildSwiftOnARM/blob/1be3c13d709724b48b418c6511a38c8f323378ec/README.md#dependencies

RUN install_packages \
libatomic1 \
libbsd0 \
libcurl3 \
libxml2 \
libedit2 \
libsqlite3-0 \
libc6-dev \
binutils \
libgcc-5-dev \
libstdc++-5-dev \
libpython2.7 \
tzdata \
git \
pkg-config \
clang

# Copy files from downloader to root
COPY --from=downloader /swift /

RUN swift --version
54 changes: 54 additions & 0 deletions Dockerfiles/architecture-base/rpi/debian/stretch/5.0.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# wlisac/rpi-debian-swift:5.0.1-stretch

ARG BASE_IMAGE=balenalib/rpi-debian:stretch

# Download and decompress the tarball into an intermediate container
# to improve cache accross different base image variations

FROM balenalib/rpi-debian:stretch as downloader

LABEL Description="Swift Downloader"

ARG TARBALL_URL=https://github.com/uraimo/buildSwiftOnARM/releases/download/5.0.1/swift-5.0.1-RPi0123-RaspbianStretch.tgz
ARG TARBALL_FILE=swift.tgz

WORKDIR /swift

RUN curl -L -o $TARBALL_FILE $TARBALL_URL \
&& tar -xvzf $TARBALL_FILE -C /swift \
&& rm $TARBALL_FILE

# Create base image

FROM "$BASE_IMAGE"

LABEL maintainer "Will Lisac <will@lisac.org>"
LABEL Description="Docker Container for Swift on Balena"

# Dependencies from official Swift Dockerfile for Swift 5.0 on Ubuntu 16.04
# https://github.com/apple/swift-docker/blob/6812f217b405a5101ea3e8fce4d1cf09e3c8727b/5.0/ubuntu/16.04/Dockerfile

# Needed to add clang (not clang-3.8)
# https://github.com/uraimo/buildSwiftOnARM/blob/1be3c13d709724b48b418c6511a38c8f323378ec/README.md#dependencies

RUN install_packages \
libatomic1 \
libbsd0 \
libcurl3 \
libxml2 \
libedit2 \
libsqlite3-0 \
libc6-dev \
binutils \
libgcc-5-dev \
libstdc++-5-dev \
libpython2.7 \
tzdata \
git \
pkg-config \
clang

# Copy files from downloader to root
COPY --from=downloader /swift /

RUN swift --version
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Autogenerated device Dockerfile based on architecture Dockerfile: wlisac/armv7hf-debian-swift:5.0.1-stretch

# wlisac/generic-armv7ahf-debian-swift:5.0.1-stretch

ARG BASE_IMAGE=balenalib/generic-armv7ahf-debian:stretch

# Download and decompress the tarball into an intermediate container
# to improve cache accross different base image variations

FROM balenalib/armv7hf-debian:stretch as downloader

LABEL Description="Swift Downloader"

ARG TARBALL_URL=https://github.com/uraimo/buildSwiftOnARM/releases/download/5.0.1/swift-5.0.1-RPi0123-RaspbianStretch.tgz
ARG TARBALL_FILE=swift.tgz

WORKDIR /swift

RUN curl -L -o $TARBALL_FILE $TARBALL_URL \
&& tar -xvzf $TARBALL_FILE -C /swift \
&& rm $TARBALL_FILE

# Create base image

FROM "$BASE_IMAGE"

LABEL maintainer "Will Lisac <will@lisac.org>"
LABEL Description="Docker Container for Swift on Balena"

# Started with dependencies from official Swift Dockerfile for Swift 5.0 on Ubuntu 16.04
# https://github.com/apple/swift-docker/blob/6812f217b405a5101ea3e8fce4d1cf09e3c8727b/5.0/ubuntu/16.04/Dockerfile

# Needed to add clang (not clang-3.8)
# https://github.com/uraimo/buildSwiftOnARM/blob/1be3c13d709724b48b418c6511a38c8f323378ec/README.md#dependencies

# Also, I was getting "Unable to locate package libgcc-5-dev" and "Unable to locate package libstdc++-5-dev"
# from the raw armv7hf base image.
# I just removed these explicit dependencies since clang includes newer versions anyway.
# https://forums.swift.org/t/which-clang-package-should-we-install/20542/7
# Upgrading to libgcc-6-dev and libstdc++-6-dev explicitly would also be fine.

RUN install_packages \
libatomic1 \
libbsd0 \
libcurl3 \
libxml2 \
libedit2 \
libsqlite3-0 \
libc6-dev \
binutils \
libpython2.7 \
tzdata \
git \
pkg-config \
clang

# Copy files from downloader to root
COPY --from=downloader /swift /

RUN swift --version
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Autogenerated device Dockerfile based on architecture Dockerfile: wlisac/armv7hf-ubuntu-swift:5.0.1-bionic

# wlisac/generic-armv7ahf-ubuntu-swift:5.0.1-bionic

ARG BASE_IMAGE=balenalib/generic-armv7ahf-ubuntu:bionic

# Download and decompress the tarball into an intermediate container
# to improve cache accross different base image variations

FROM balenalib/armv7hf-ubuntu:bionic as downloader

LABEL Description="Swift Downloader"

ARG TARBALL_URL=https://github.com/uraimo/buildSwiftOnARM/releases/download/5.0.1/swift-5.0.1-RPi23-Ubuntu1804.tgz
ARG TARBALL_FILE=swift.tgz

WORKDIR /swift

RUN curl -L -o $TARBALL_FILE $TARBALL_URL \
&& tar -xvzf $TARBALL_FILE -C /swift \
&& rm $TARBALL_FILE

# Create base image

FROM "$BASE_IMAGE"

LABEL maintainer "Will Lisac <will@lisac.org>"
LABEL Description="Docker Container for Swift on Balena"

# Dependencies from official Swift Dockerfile for Swift 5.0 on Ubuntu 18.04
# https://github.com/apple/swift-docker/blob/6812f217b405a5101ea3e8fce4d1cf09e3c8727b/5.0/ubuntu/18.04/Dockerfile

# Needed to add clang
# https://github.com/uraimo/buildSwiftOnARM/blob/1be3c13d709724b48b418c6511a38c8f323378ec/README.md#dependencies

RUN install_packages \
libatomic1 \
libbsd0 \
libcurl4 \
libxml2 \
libedit2 \
libsqlite3-0 \
libc6-dev \
binutils \
libgcc-5-dev \
libstdc++-5-dev \
libpython2.7 \
tzdata \
git \
pkg-config \
clang

# Copy files from downloader to root
COPY --from=downloader /swift /

RUN swift --version
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Autogenerated device Dockerfile based on architecture Dockerfile: wlisac/armv7hf-ubuntu-swift:5.0.1-xenial

# wlisac/generic-armv7ahf-ubuntu-swift:5.0.1-xenial

ARG BASE_IMAGE=balenalib/generic-armv7ahf-ubuntu:xenial

# Download and decompress the tarball into an intermediate container
# to improve cache accross different base image variations

FROM balenalib/armv7hf-ubuntu:xenial as downloader

LABEL Description="Swift Downloader"

ARG TARBALL_URL=https://github.com/uraimo/buildSwiftOnARM/releases/download/5.0.1/swift-5.0.1-RPi23-Ubuntu1604.tgz
ARG TARBALL_FILE=swift.tgz

WORKDIR /swift

RUN curl -L -o $TARBALL_FILE $TARBALL_URL \
&& tar -xvzf $TARBALL_FILE -C /swift \
&& rm $TARBALL_FILE

# Create base image

FROM "$BASE_IMAGE"

LABEL maintainer "Will Lisac <will@lisac.org>"
LABEL Description="Docker Container for Swift on Balena"

# Dependencies from official Swift Dockerfile for Swift 5.0 on Ubuntu 16.04
# https://github.com/apple/swift-docker/blob/6812f217b405a5101ea3e8fce4d1cf09e3c8727b/5.0/ubuntu/16.04/Dockerfile

# Needed to add clang (not clang-3.8)
# https://github.com/uraimo/buildSwiftOnARM/blob/1be3c13d709724b48b418c6511a38c8f323378ec/README.md#dependencies

RUN install_packages \
libatomic1 \
libbsd0 \
libcurl3 \
libxml2 \
libedit2 \
libsqlite3-0 \
libc6-dev \
binutils \
libgcc-5-dev \
libstdc++-5-dev \
libpython2.7 \
tzdata \
git \
pkg-config \
clang

# Copy files from downloader to root
COPY --from=downloader /swift /

RUN swift --version
Loading

0 comments on commit 39010b4

Please sign in to comment.