Skip to content

Commit 39010b4

Browse files
authored
Merge pull request #3 from wlisac/swift-5.0.1
Add Swift 5.0.1 for ARMv6 and ARMv7
2 parents 531aefd + b67f47b commit 39010b4

File tree

15 files changed

+800
-8
lines changed

15 files changed

+800
-8
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# wlisac/armv7hf-debian-swift:5.0.1-stretch
2+
3+
ARG BASE_IMAGE=balenalib/armv7hf-debian:stretch
4+
5+
# Download and decompress the tarball into an intermediate container
6+
# to improve cache accross different base image variations
7+
8+
FROM balenalib/armv7hf-debian:stretch as downloader
9+
10+
LABEL Description="Swift Downloader"
11+
12+
ARG TARBALL_URL=https://github.com/uraimo/buildSwiftOnARM/releases/download/5.0.1/swift-5.0.1-RPi0123-RaspbianStretch.tgz
13+
ARG TARBALL_FILE=swift.tgz
14+
15+
WORKDIR /swift
16+
17+
RUN curl -L -o $TARBALL_FILE $TARBALL_URL \
18+
&& tar -xvzf $TARBALL_FILE -C /swift \
19+
&& rm $TARBALL_FILE
20+
21+
# Create base image
22+
23+
FROM "$BASE_IMAGE"
24+
25+
LABEL maintainer "Will Lisac <will@lisac.org>"
26+
LABEL Description="Docker Container for Swift on Balena"
27+
28+
# Started with dependencies from official Swift Dockerfile for Swift 5.0 on Ubuntu 16.04
29+
# https://github.com/apple/swift-docker/blob/6812f217b405a5101ea3e8fce4d1cf09e3c8727b/5.0/ubuntu/16.04/Dockerfile
30+
31+
# Needed to add clang (not clang-3.8)
32+
# https://github.com/uraimo/buildSwiftOnARM/blob/1be3c13d709724b48b418c6511a38c8f323378ec/README.md#dependencies
33+
34+
# Also, I was getting "Unable to locate package libgcc-5-dev" and "Unable to locate package libstdc++-5-dev"
35+
# from the raw armv7hf base image.
36+
# I just removed these explicit dependencies since clang includes newer versions anyway.
37+
# https://forums.swift.org/t/which-clang-package-should-we-install/20542/7
38+
# Upgrading to libgcc-6-dev and libstdc++-6-dev explicitly would also be fine.
39+
40+
RUN install_packages \
41+
libatomic1 \
42+
libbsd0 \
43+
libcurl3 \
44+
libxml2 \
45+
libedit2 \
46+
libsqlite3-0 \
47+
libc6-dev \
48+
binutils \
49+
libpython2.7 \
50+
tzdata \
51+
git \
52+
pkg-config \
53+
clang
54+
55+
# Copy files from downloader to root
56+
COPY --from=downloader /swift /
57+
58+
RUN swift --version
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# wlisac/armv7hf-ubuntu-swift:5.0.1-bionic
2+
3+
ARG BASE_IMAGE=balenalib/armv7hf-ubuntu:bionic
4+
5+
# Download and decompress the tarball into an intermediate container
6+
# to improve cache accross different base image variations
7+
8+
FROM balenalib/armv7hf-ubuntu:bionic as downloader
9+
10+
LABEL Description="Swift Downloader"
11+
12+
ARG TARBALL_URL=https://github.com/uraimo/buildSwiftOnARM/releases/download/5.0.1/swift-5.0.1-RPi23-Ubuntu1804.tgz
13+
ARG TARBALL_FILE=swift.tgz
14+
15+
WORKDIR /swift
16+
17+
RUN curl -L -o $TARBALL_FILE $TARBALL_URL \
18+
&& tar -xvzf $TARBALL_FILE -C /swift \
19+
&& rm $TARBALL_FILE
20+
21+
# Create base image
22+
23+
FROM "$BASE_IMAGE"
24+
25+
LABEL maintainer "Will Lisac <will@lisac.org>"
26+
LABEL Description="Docker Container for Swift on Balena"
27+
28+
# Dependencies from official Swift Dockerfile for Swift 5.0 on Ubuntu 18.04
29+
# https://github.com/apple/swift-docker/blob/6812f217b405a5101ea3e8fce4d1cf09e3c8727b/5.0/ubuntu/18.04/Dockerfile
30+
31+
# Needed to add clang
32+
# https://github.com/uraimo/buildSwiftOnARM/blob/1be3c13d709724b48b418c6511a38c8f323378ec/README.md#dependencies
33+
34+
RUN install_packages \
35+
libatomic1 \
36+
libbsd0 \
37+
libcurl4 \
38+
libxml2 \
39+
libedit2 \
40+
libsqlite3-0 \
41+
libc6-dev \
42+
binutils \
43+
libgcc-5-dev \
44+
libstdc++-5-dev \
45+
libpython2.7 \
46+
tzdata \
47+
git \
48+
pkg-config \
49+
clang
50+
51+
# Copy files from downloader to root
52+
COPY --from=downloader /swift /
53+
54+
RUN swift --version
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# wlisac/armv7hf-ubuntu-swift:5.0.1-xenial
2+
3+
ARG BASE_IMAGE=balenalib/armv7hf-ubuntu:xenial
4+
5+
# Download and decompress the tarball into an intermediate container
6+
# to improve cache accross different base image variations
7+
8+
FROM balenalib/armv7hf-ubuntu:xenial as downloader
9+
10+
LABEL Description="Swift Downloader"
11+
12+
ARG TARBALL_URL=https://github.com/uraimo/buildSwiftOnARM/releases/download/5.0.1/swift-5.0.1-RPi23-Ubuntu1604.tgz
13+
ARG TARBALL_FILE=swift.tgz
14+
15+
WORKDIR /swift
16+
17+
RUN curl -L -o $TARBALL_FILE $TARBALL_URL \
18+
&& tar -xvzf $TARBALL_FILE -C /swift \
19+
&& rm $TARBALL_FILE
20+
21+
# Create base image
22+
23+
FROM "$BASE_IMAGE"
24+
25+
LABEL maintainer "Will Lisac <will@lisac.org>"
26+
LABEL Description="Docker Container for Swift on Balena"
27+
28+
# Dependencies from official Swift Dockerfile for Swift 5.0 on Ubuntu 16.04
29+
# https://github.com/apple/swift-docker/blob/6812f217b405a5101ea3e8fce4d1cf09e3c8727b/5.0/ubuntu/16.04/Dockerfile
30+
31+
# Needed to add clang (not clang-3.8)
32+
# https://github.com/uraimo/buildSwiftOnARM/blob/1be3c13d709724b48b418c6511a38c8f323378ec/README.md#dependencies
33+
34+
RUN install_packages \
35+
libatomic1 \
36+
libbsd0 \
37+
libcurl3 \
38+
libxml2 \
39+
libedit2 \
40+
libsqlite3-0 \
41+
libc6-dev \
42+
binutils \
43+
libgcc-5-dev \
44+
libstdc++-5-dev \
45+
libpython2.7 \
46+
tzdata \
47+
git \
48+
pkg-config \
49+
clang
50+
51+
# Copy files from downloader to root
52+
COPY --from=downloader /swift /
53+
54+
RUN swift --version
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# wlisac/rpi-debian-swift:5.0.1-stretch
2+
3+
ARG BASE_IMAGE=balenalib/rpi-debian:stretch
4+
5+
# Download and decompress the tarball into an intermediate container
6+
# to improve cache accross different base image variations
7+
8+
FROM balenalib/rpi-debian:stretch as downloader
9+
10+
LABEL Description="Swift Downloader"
11+
12+
ARG TARBALL_URL=https://github.com/uraimo/buildSwiftOnARM/releases/download/5.0.1/swift-5.0.1-RPi0123-RaspbianStretch.tgz
13+
ARG TARBALL_FILE=swift.tgz
14+
15+
WORKDIR /swift
16+
17+
RUN curl -L -o $TARBALL_FILE $TARBALL_URL \
18+
&& tar -xvzf $TARBALL_FILE -C /swift \
19+
&& rm $TARBALL_FILE
20+
21+
# Create base image
22+
23+
FROM "$BASE_IMAGE"
24+
25+
LABEL maintainer "Will Lisac <will@lisac.org>"
26+
LABEL Description="Docker Container for Swift on Balena"
27+
28+
# Dependencies from official Swift Dockerfile for Swift 5.0 on Ubuntu 16.04
29+
# https://github.com/apple/swift-docker/blob/6812f217b405a5101ea3e8fce4d1cf09e3c8727b/5.0/ubuntu/16.04/Dockerfile
30+
31+
# Needed to add clang (not clang-3.8)
32+
# https://github.com/uraimo/buildSwiftOnARM/blob/1be3c13d709724b48b418c6511a38c8f323378ec/README.md#dependencies
33+
34+
RUN install_packages \
35+
libatomic1 \
36+
libbsd0 \
37+
libcurl3 \
38+
libxml2 \
39+
libedit2 \
40+
libsqlite3-0 \
41+
libc6-dev \
42+
binutils \
43+
libgcc-5-dev \
44+
libstdc++-5-dev \
45+
libpython2.7 \
46+
tzdata \
47+
git \
48+
pkg-config \
49+
clang
50+
51+
# Copy files from downloader to root
52+
COPY --from=downloader /swift /
53+
54+
RUN swift --version
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Autogenerated device Dockerfile based on architecture Dockerfile: wlisac/armv7hf-debian-swift:5.0.1-stretch
2+
3+
# wlisac/generic-armv7ahf-debian-swift:5.0.1-stretch
4+
5+
ARG BASE_IMAGE=balenalib/generic-armv7ahf-debian:stretch
6+
7+
# Download and decompress the tarball into an intermediate container
8+
# to improve cache accross different base image variations
9+
10+
FROM balenalib/armv7hf-debian:stretch as downloader
11+
12+
LABEL Description="Swift Downloader"
13+
14+
ARG TARBALL_URL=https://github.com/uraimo/buildSwiftOnARM/releases/download/5.0.1/swift-5.0.1-RPi0123-RaspbianStretch.tgz
15+
ARG TARBALL_FILE=swift.tgz
16+
17+
WORKDIR /swift
18+
19+
RUN curl -L -o $TARBALL_FILE $TARBALL_URL \
20+
&& tar -xvzf $TARBALL_FILE -C /swift \
21+
&& rm $TARBALL_FILE
22+
23+
# Create base image
24+
25+
FROM "$BASE_IMAGE"
26+
27+
LABEL maintainer "Will Lisac <will@lisac.org>"
28+
LABEL Description="Docker Container for Swift on Balena"
29+
30+
# Started with dependencies from official Swift Dockerfile for Swift 5.0 on Ubuntu 16.04
31+
# https://github.com/apple/swift-docker/blob/6812f217b405a5101ea3e8fce4d1cf09e3c8727b/5.0/ubuntu/16.04/Dockerfile
32+
33+
# Needed to add clang (not clang-3.8)
34+
# https://github.com/uraimo/buildSwiftOnARM/blob/1be3c13d709724b48b418c6511a38c8f323378ec/README.md#dependencies
35+
36+
# Also, I was getting "Unable to locate package libgcc-5-dev" and "Unable to locate package libstdc++-5-dev"
37+
# from the raw armv7hf base image.
38+
# I just removed these explicit dependencies since clang includes newer versions anyway.
39+
# https://forums.swift.org/t/which-clang-package-should-we-install/20542/7
40+
# Upgrading to libgcc-6-dev and libstdc++-6-dev explicitly would also be fine.
41+
42+
RUN install_packages \
43+
libatomic1 \
44+
libbsd0 \
45+
libcurl3 \
46+
libxml2 \
47+
libedit2 \
48+
libsqlite3-0 \
49+
libc6-dev \
50+
binutils \
51+
libpython2.7 \
52+
tzdata \
53+
git \
54+
pkg-config \
55+
clang
56+
57+
# Copy files from downloader to root
58+
COPY --from=downloader /swift /
59+
60+
RUN swift --version
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Autogenerated device Dockerfile based on architecture Dockerfile: wlisac/armv7hf-ubuntu-swift:5.0.1-bionic
2+
3+
# wlisac/generic-armv7ahf-ubuntu-swift:5.0.1-bionic
4+
5+
ARG BASE_IMAGE=balenalib/generic-armv7ahf-ubuntu:bionic
6+
7+
# Download and decompress the tarball into an intermediate container
8+
# to improve cache accross different base image variations
9+
10+
FROM balenalib/armv7hf-ubuntu:bionic as downloader
11+
12+
LABEL Description="Swift Downloader"
13+
14+
ARG TARBALL_URL=https://github.com/uraimo/buildSwiftOnARM/releases/download/5.0.1/swift-5.0.1-RPi23-Ubuntu1804.tgz
15+
ARG TARBALL_FILE=swift.tgz
16+
17+
WORKDIR /swift
18+
19+
RUN curl -L -o $TARBALL_FILE $TARBALL_URL \
20+
&& tar -xvzf $TARBALL_FILE -C /swift \
21+
&& rm $TARBALL_FILE
22+
23+
# Create base image
24+
25+
FROM "$BASE_IMAGE"
26+
27+
LABEL maintainer "Will Lisac <will@lisac.org>"
28+
LABEL Description="Docker Container for Swift on Balena"
29+
30+
# Dependencies from official Swift Dockerfile for Swift 5.0 on Ubuntu 18.04
31+
# https://github.com/apple/swift-docker/blob/6812f217b405a5101ea3e8fce4d1cf09e3c8727b/5.0/ubuntu/18.04/Dockerfile
32+
33+
# Needed to add clang
34+
# https://github.com/uraimo/buildSwiftOnARM/blob/1be3c13d709724b48b418c6511a38c8f323378ec/README.md#dependencies
35+
36+
RUN install_packages \
37+
libatomic1 \
38+
libbsd0 \
39+
libcurl4 \
40+
libxml2 \
41+
libedit2 \
42+
libsqlite3-0 \
43+
libc6-dev \
44+
binutils \
45+
libgcc-5-dev \
46+
libstdc++-5-dev \
47+
libpython2.7 \
48+
tzdata \
49+
git \
50+
pkg-config \
51+
clang
52+
53+
# Copy files from downloader to root
54+
COPY --from=downloader /swift /
55+
56+
RUN swift --version
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Autogenerated device Dockerfile based on architecture Dockerfile: wlisac/armv7hf-ubuntu-swift:5.0.1-xenial
2+
3+
# wlisac/generic-armv7ahf-ubuntu-swift:5.0.1-xenial
4+
5+
ARG BASE_IMAGE=balenalib/generic-armv7ahf-ubuntu:xenial
6+
7+
# Download and decompress the tarball into an intermediate container
8+
# to improve cache accross different base image variations
9+
10+
FROM balenalib/armv7hf-ubuntu:xenial as downloader
11+
12+
LABEL Description="Swift Downloader"
13+
14+
ARG TARBALL_URL=https://github.com/uraimo/buildSwiftOnARM/releases/download/5.0.1/swift-5.0.1-RPi23-Ubuntu1604.tgz
15+
ARG TARBALL_FILE=swift.tgz
16+
17+
WORKDIR /swift
18+
19+
RUN curl -L -o $TARBALL_FILE $TARBALL_URL \
20+
&& tar -xvzf $TARBALL_FILE -C /swift \
21+
&& rm $TARBALL_FILE
22+
23+
# Create base image
24+
25+
FROM "$BASE_IMAGE"
26+
27+
LABEL maintainer "Will Lisac <will@lisac.org>"
28+
LABEL Description="Docker Container for Swift on Balena"
29+
30+
# Dependencies from official Swift Dockerfile for Swift 5.0 on Ubuntu 16.04
31+
# https://github.com/apple/swift-docker/blob/6812f217b405a5101ea3e8fce4d1cf09e3c8727b/5.0/ubuntu/16.04/Dockerfile
32+
33+
# Needed to add clang (not clang-3.8)
34+
# https://github.com/uraimo/buildSwiftOnARM/blob/1be3c13d709724b48b418c6511a38c8f323378ec/README.md#dependencies
35+
36+
RUN install_packages \
37+
libatomic1 \
38+
libbsd0 \
39+
libcurl3 \
40+
libxml2 \
41+
libedit2 \
42+
libsqlite3-0 \
43+
libc6-dev \
44+
binutils \
45+
libgcc-5-dev \
46+
libstdc++-5-dev \
47+
libpython2.7 \
48+
tzdata \
49+
git \
50+
pkg-config \
51+
clang
52+
53+
# Copy files from downloader to root
54+
COPY --from=downloader /swift /
55+
56+
RUN swift --version

0 commit comments

Comments
 (0)