├── .gitignore
├── Makefile
├── README.md
├── arm64v8-4.1.x-futurejones
└── arm64v8-ubuntu-swift-4.1.x.dockerfile
├── arm64v8-4.2.0-futurejones
├── Makefile
├── README.md
└── arm64v8-ubuntu-swift-4.2.0.dockerfile
├── arm64v8-4.2.1-futurejones
├── Makefile
├── README.md
└── arm64v8-ubuntu-swift-4.2.1.dockerfile
├── arm64v8-5.0.0-futurejones
├── Makefile
├── README.md
└── arm64v8-ubuntu-16.04-swift-5.0.0.dockerfile
├── arm64v8-5.3.2-futurejones
├── Makefile
├── README.md
└── arm64v8-ubuntu-18.04-swift-5.3.2.dockerfile
├── arm64v8-5.5.1-futurejones
├── Makefile
├── README.md
└── arm64v8-ubuntu-20.04-swift-5.5.1.dockerfile
├── arm64v8-5.5.3-futurejones
├── Makefile
├── README.md
└── arm64v8-ubuntu-20.04-swift-5.5.3.dockerfile
├── arm64v8-5.7.2-futurejones
├── Makefile
├── README.md
└── arm64v8-ubuntu-focal-swift-5.7.2.dockerfile
├── empty-ctx
├── arm64v8-swift-4.1.0-dev.dockerfile
├── arm64v8-swift-4.1.1-dev.dockerfile
├── arm64v8-swift-4.2.1-dev.dockerfile
├── arm64v8-swift-5.0.0-dev.dockerfile
├── arm64v8-swift-5.3.2-dev.dockerfile
├── arm64v8-swift-5.5.1-dev.dockerfile
├── arm64v8-swift-5.5.3-dev.dockerfile
├── arm64v8-swift-5.7.2-dev.dockerfile
├── build-3.1.1.sh
├── rpi-mod_swift-demo-dev.dockerfile
├── rpi-mod_swift-demo.dockerfile
├── rpi-raspbian-swift-3.0.2-build.dockerfile
├── rpi-raspbian-swift-3.0.2-dev.dockerfile
├── rpi-raspbian-swift-3.1.1-build.dockerfile
├── rpi-raspbian-swift-build-env.dockerfile
├── rpi-swift-3.1.0-dev.dockerfile
├── rpi-swift-3.1.1-dev.dockerfile
├── rpi-swift-4.1.0-dev.dockerfile
├── rpi-swift-4.1.2-dev.dockerfile
├── rpi-swift-4.1.alpha1-dev.dockerfile
├── rpi-ubuntu-swift-3.1.0-build-all.dockerfile
├── rpi-ubuntu-swift-3.1.0-build.dockerfile
├── rpi-ubuntu-swift-3.1.1-build.dockerfile
├── rpi-ubuntu-swift-4.0.x-build.dockerfile
├── rpi-ubuntu-swift-build-env.dockerfile
├── swift-3.1.0-dev.dockerfile
├── swift-4.0.3-dev.dockerfile
└── swift-4.1-dev.dockerfile
├── grab-swift.sh
├── make-swift-branch-tarball.sh
├── rpi-armv6-swift-4.1.3-uraimo-ctx
└── rpi-armv6-debian-stretch-swift-4.1.3.dockerfile
├── rpi-armv6-swift-4.2.2-uraimo-ctx
└── rpi-armv6-debian-stretch-swift-4.2.2.dockerfile
├── rpi-swift-3.1.0-build-ctx
├── rpi-raspbian-swift-build31-env.dockerfile
└── rpi-ubuntu-swift-build31-env.dockerfile
├── rpi-swift-3.1.0-ctx
└── rpi-ubuntu-swift-3.1.0.dockerfile
├── rpi-swift-3.1.1-build-ctx
├── rpi-raspbian-swift-build311-env.dockerfile
└── rpi-ubuntu-swift-build311-env.dockerfile
├── rpi-swift-3.1.1-ctx
└── rpi-ubuntu-swift-3.1.1.dockerfile
├── rpi-swift-302-build-ctx
└── rpi-raspbian-swift-build302-env.dockerfile
├── rpi-swift-302-ctx
└── rpi-raspbian-swift-302.dockerfile
├── rpi-swift-4.0.x-build-ctx
└── rpi-ubuntu-swift-build40x-env.dockerfile
├── rpi-swift-4.1.0-chnmrc-ctx
├── dispatch-module.modulemap
└── rpi-ubuntu-swift-4.1.0.dockerfile
├── rpi-swift-4.1.2-chnmrc-ctx
└── rpi-ubuntu-swift-4.1.2.dockerfile
├── rpi-swift-4.1.x-uraimo-ctx
└── rpi-ubuntu-swift-4.1.x.dockerfile
├── rpi-swift-4.2.2-uraimo-ctx
├── rpi-debian-swift-4.2.2.dockerfile
└── rpi-ubuntu-swift-4.2.2.dockerfile
├── swift-6.1-dev
├── Dockerfile
└── Makefile
└── toolchain
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | *.tgz
2 | *.bz2
3 | *.gz
4 | swift-checkout
5 | buildSwiftOnARM
6 |
7 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile
2 |
3 | #all : # build-rpi-swift build-rpi-swift-dev # build-rpi-swift-build302
4 | all : build-rpi-swift-31 build-rpi-swift-31-dev
5 |
6 | PACKAGE_TARGET_DIR=/tmp
7 |
8 | # --------------------------- 5.7
9 |
10 | build-arm64-swift-5.7 :
11 | (cd arm64v8-5.7.2-futurejones; make fetch build)
12 |
13 | build-arm64-swift-5.7-dev :
14 | time docker build \
15 | -t helje5/arm64v8-swift-dev:5.7.2 \
16 | -t helje5/arm64v8-swift-dev:5.7-latest \
17 | -t helje5/arm64v8-swift-dev:latest \
18 | -f empty-ctx/arm64v8-swift-5.7.2-dev.dockerfile \
19 | ./empty-ctx
20 | docker images | grep helje5/arm64v8
21 |
22 | # --------------------------- 5.5
23 |
24 | build-arm64-swift-5.5 :
25 | (cd arm64v8-5.5.3-futurejones; make fetch build)
26 |
27 | build-arm64-swift-5.5-dev :
28 | time docker build \
29 | -t helje5/arm64v8-swift-dev:5.5.3 \
30 | -t helje5/arm64v8-swift-dev:5.5-latest \
31 | -f empty-ctx/arm64v8-swift-5.5.3-dev.dockerfile \
32 | ./empty-ctx
33 | docker images | grep helje5/arm64v8
34 |
35 | # --------------------------- 5.3
36 |
37 | build-arm64-swift-5.3 :
38 | (cd arm64v8-5.3.2-futurejones; make fetch build)
39 |
40 | build-arm64-swift-5.3-dev :
41 | time docker build \
42 | -t helje5/arm64v8-swift-dev:5.3.2 \
43 | -t helje5/arm64v8-swift-dev:5.3-latest \
44 | -f empty-ctx/arm64v8-swift-5.3.2-dev.dockerfile \
45 | ./empty-ctx
46 | docker images | grep helje5/arm64v8
47 |
48 | # --------------------------- 5.0
49 |
50 | build-arm64-swift-5.0 :
51 | (cd arm64v8-5.0.0-futurejones; make fetch build)
52 |
53 | build-arm64-swift-5dev-dev :
54 | time docker build \
55 | -t helje5/arm64v8-swift-dev:5.0.0 \
56 | -t helje5/arm64v8-swift-dev:5.0-latest \
57 | -f empty-ctx/arm64v8-swift-5.0.0-dev.dockerfile \
58 | ./empty-ctx
59 | docker images | grep helje5/arm64v8
60 |
61 | # --------------------------- 4.2.x
62 |
63 | build-arm64-swift-42 :
64 | time docker build -t helje5/arm64v8-swift:4.2.1 \
65 | -f arm64v8-4.2.1-futurejones/arm64v8-ubuntu-swift-4.2.1.dockerfile \
66 | ./empty-ctx
67 | docker images | grep helje5/arm64v8
68 |
69 | build-arm64-swift-42-dev :
70 | time docker build -t helje5/arm64v8-swift-dev:4.2.1 \
71 | -f empty-ctx/arm64v8-swift-4.2.1-dev.dockerfile \
72 | ./empty-ctx
73 | docker images | grep helje5/arm64v8
74 |
75 | # --------------------------- 4.1.x
76 |
77 | build-arm64-swift-41 :
78 | time docker build -t helje5/arm64v8-swift:4.1.1 \
79 | -f arm64v8-4.1.x-futurejones/arm64v8-ubuntu-swift-4.1.x.dockerfile \
80 | ./empty-ctx
81 | docker images | grep helje5/arm64v8
82 |
83 | build-arm64-swift-41-dev :
84 | time docker build -t helje5/arm64v8-swift-dev:4.1.1 \
85 | -f empty-ctx/arm64v8-swift-4.1.1-dev.dockerfile \
86 | ./empty-ctx
87 | docker images | grep helje5/arm64v8
88 |
89 | build-rpi-swift-41 :
90 | time docker build -t helje5/rpi-swift:4.1.2 \
91 | -f rpi-swift-4.1.2-chnmrc-ctx/rpi-ubuntu-swift-4.1.2.dockerfile \
92 | rpi-swift-4.1.2-chnmrc-ctx
93 | docker images | grep helje5
94 |
95 | build-rpi-swift-41-dev :
96 | time docker build \
97 | -t helje5/rpi-swift-dev:4.1.2 \
98 | -f empty-ctx/rpi-swift-4.1.2-dev.dockerfile \
99 | empty-ctx
100 | docker images | grep helje5
101 |
102 | build-rpi-swift-41-snap-uraimo :
103 | time docker build -t helje5/rpi-swift:4.1.alpha1 \
104 | -f rpi-swift-4.1.x-uraimo-ctx/rpi-ubuntu-swift-4.1.x.dockerfile \
105 | rpi-swift-4.1.x-uraimo-ctx
106 | docker images | grep helje5
107 |
108 | build-rpi-swift-41-snap-uraimo-dev :
109 | time docker build \
110 | -t helje5/rpi-swift-dev:4.1.alpha1 \
111 | -f empty-ctx/rpi-swift-4.1.alpha1-dev.dockerfile \
112 | empty-ctx
113 | docker images | grep helje5
114 |
115 | # --------------------------- 4.0.x
116 |
117 | build-rpi-swift-40 :
118 | time docker build -t helje5/rpi-swift:4.0.x \
119 | -f rpi-swift-4.0.x-ctx/rpi-ubuntu-swift-4.0.x.dockerfile \
120 | rpi-swift-4.0.x-ctx
121 | docker images | grep helje5
122 |
123 | build-rpi-swift-40-dev :
124 | time docker build \
125 | -t helje5/rpi-swift-dev:4.0.x \
126 | -f empty-ctx/rpi-swift-4.0.x-dev.dockerfile \
127 | empty-ctx
128 | docker images | grep helje5
129 |
130 | # --------------------------- 3.1.1
131 |
132 | build-rpi-swift-311 :
133 | time docker build -t helje5/rpi-swift:latest -t helje5/rpi-swift:3.1.1 \
134 | -f rpi-swift-3.1.1-ctx/rpi-ubuntu-swift-3.1.1.dockerfile \
135 | rpi-swift-3.1.1-ctx
136 | docker images | grep helje5
137 |
138 | build-rpi-swift-311-dev :
139 | time docker build -t helje5/rpi-swift-dev:latest \
140 | -t helje5/rpi-swift-dev:3.1.1 \
141 | -f empty-ctx/rpi-swift-3.1.1-dev.dockerfile \
142 | empty-ctx
143 | docker images | grep helje5
144 |
145 | # --------------------------- 3.1.0
146 |
147 | build-rpi-swift-31 :
148 | time docker build -t helje5/rpi-swift:latest -t helje5/rpi-swift:3.1.0 \
149 | -f rpi-swift-3.1.0-ctx/rpi-ubuntu-swift-3.1.0.dockerfile \
150 | rpi-swift-3.1.0-ctx
151 | docker images | grep helje5
152 |
153 | build-rpi-swift-31-dev :
154 | time docker build -t helje5/rpi-swift-dev:latest \
155 | -t helje5/rpi-swift-dev:3.1.0 \
156 | -f empty-ctx/rpi-swift-3.1.0-dev.dockerfile \
157 | empty-ctx
158 | docker images | grep helje5
159 |
160 | # --------------------------- 3.0.2
161 |
162 | build-rpi-swift-302 :
163 | docker build -t helje5/rpi-swift \
164 | -f rpi-swift-302-ctx/rpi-raspbian-swift-302.dockerfile \
165 | rpi-swift-302-ctx
166 | docker images | grep helje5
167 |
168 | build-rpi-swift-dev : build-rpi-swift
169 | docker build -t helje5/rpi-swift-dev \
170 | -f empty-ctx/rpi-raspbian-swift302-dev.dockerfile \
171 | empty-ctx
172 | docker images | grep helje5
173 |
174 | # --------------------------- mod_swift
175 |
176 | build-rpi-mod_swift-demo :
177 | time docker build -t modswift/rpi-mod_swift-demo:latest \
178 | -t modswift/rpi-mod_swift-demo:3.1.0 \
179 | -f empty-ctx/rpi-mod_swift-demo.dockerfile \
180 | empty-ctx
181 | docker images | grep modswift
182 |
183 | build-rpi-mod_swift-demo-dev :
184 | time docker build -t modswift/rpi-mod_swift-demo-dev:latest \
185 | -t modswift/rpi-mod_swift-demo-dev:3.1.0 \
186 | -f empty-ctx/rpi-mod_swift-demo-dev.dockerfile \
187 | empty-ctx
188 | docker images | grep modswift
189 |
190 |
191 | # --------------------------- Building Swift itself
192 |
193 | EXTRAFLAGS=
194 | ifeq ($(nocache),yes)
195 | EXTRAFLAGS += --no-cache
196 | endif
197 |
198 | # -v $(PACKAGE_TARGET_DIR):/package \
199 | # is non-sense here ... Do not build an image, but rather run a script in the
200 | # Ubuntu base docker ...
201 |
202 | build-rpi-ubuntu-swift40x-build :
203 | time docker build -t helje5/rpi-ubuntu-swift40x-build \
204 | $(EXTRAFLAGS) \
205 | -f empty-ctx/rpi-ubuntu-swift-4.0.x-build.dockerfile \
206 | empty-ctx
207 | docker images | grep helje5/rpi-ubuntu-swift40x
208 |
209 | build-rpi-ubuntu-swift311-build :
210 | time docker build -t helje5/rpi-ubuntu-swift311-build \
211 | $(EXTRAFLAGS) \
212 | -f empty-ctx/rpi-ubuntu-swift-3.1.1-build.dockerfile \
213 | empty-ctx
214 | docker images | grep helje5/rpi-ubuntu-swift311
215 |
216 | build-rpi-raspbian-swift311-build :
217 | time docker build -t helje5/rpi-raspbian-swift311-build \
218 | $(EXTRAFLAGS) \
219 | -f empty-ctx/rpi-raspbian-swift-3.1.1-build.dockerfile \
220 | empty-ctx
221 | docker images | grep helje5/rpi-raspbian-swift311
222 |
223 | build-rpi-ubuntu-swift31-build :
224 | time docker build -t helje5/rpi-ubuntu-swift31-build \
225 | $(EXTRAFLAGS) \
226 | -f empty-ctx/rpi-ubuntu-swift-3.1.0-build.dockerfile \
227 | empty-ctx
228 | docker images | grep helje5/rpi-ubuntu-swift31
229 |
230 | build-rpi-swift-build302 : # build-rpi-raspbian-swift-build302-env
231 | time docker build -t helje5/rpi-swift-build \
232 | $(EXTRAFLAGS) \
233 | -f empty-ctx/rpi-raspbian-swift302-build.dockerfile \
234 | empty-ctx
235 | docker images | grep helje5/rpi-swift-build
236 |
237 | # A basic setup containing the necessary packages to build Swift
238 | # (clang and such, also sets clang as the compiler)
239 | build-rpi-raspbian-swift-build-env :
240 | time docker build -t helje5/rpi-raspbian-swift-build-env \
241 | $(EXTRAFLAGS) \
242 | -f empty-ctx/rpi-raspbian-swift-build-env.dockerfile \
243 | empty-ctx
244 | docker images | grep helje5/rpi-raspbian-swift-build-env
245 |
246 | # A basic setup containing the necessary packages to build Swift
247 | # (clang and such, also sets clang as the compiler)
248 | build-rpi-ubuntu-swift-build-env :
249 | time docker build -t helje5/rpi-ubuntu-swift-build-env \
250 | $(EXTRAFLAGS) \
251 | -f empty-ctx/rpi-ubuntu-swift-build-env.dockerfile \
252 | empty-ctx
253 | docker images | grep helje5/rpi-ubuntu-swift-build-env
254 |
255 | # contains the 3.0.2 Swift Sources
256 | build-rpi-raspbian-swift-build302-env : build-rpi-raspbian-swift-build-env
257 | time docker build -t helje5/rpi-raspbian-swift-build302-env \
258 | -f rpi-swift-302-ctx/rpi-raspbian-swift-build302-env.dockerfile \
259 | rpi-swift-302-build-ctx
260 | docker images | grep helje5/rpi-raspbian-swift-build302-env
261 |
262 | # contains the 3.1 Swift Sources
263 | build-rpi-ubuntu-swift-build31-env : build-rpi-ubuntu-swift-build-env
264 | time docker build -t helje5/rpi-ubuntu-swift-build31-env \
265 | -f rpi-swift-31-ctx/rpi-ubuntu-swift-build31-env.dockerfile \
266 | rpi-swift-31-build-ctx
267 | docker images | grep helje5/rpi-ubuntu-swift-build31-env
268 |
269 | # contains the 3.1.1 Swift Sources
270 | build-rpi-ubuntu-swift-build311-env :
271 | time docker build -t helje5/rpi-ubuntu-swift-build311-env \
272 | -f rpi-swift-3.1.1-build-ctx/rpi-ubuntu-swift-build311-env.dockerfile \
273 | rpi-swift-3.1.1-build-ctx
274 | docker images | grep helje5/rpi-ubuntu-swift-build311-env
275 |
276 | # contains the 3.1.1 Swift Sources
277 | build-rpi-raspbian-swift-build311-env :
278 | time docker build -t helje5/rpi-raspbian-swift-build311-env \
279 | -f rpi-swift-3.1.1-build-ctx/rpi-raspbian-swift-build311-env.dockerfile \
280 | rpi-swift-3.1.1-build-ctx
281 | docker images | grep helje5/rpi-raspbian-swift-build311-env
282 |
283 | # contains the 4.0.x Swift Sources
284 | build-rpi-ubuntu-swift-build40-env :
285 | time docker build -t helje5/rpi-ubuntu-swift-build40x-env \
286 | -f rpi-swift-4.0.x-build-ctx/rpi-ubuntu-swift-build40x-env.dockerfile \
287 | rpi-swift-4.0.x-build-ctx
288 | docker images | grep helje5/rpi-ubuntu-swift-build40x-env
289 |
290 |
291 | # ---------------------------
292 |
293 | list :
294 | docker images | grep helje5
295 |
296 | swift-version :
297 | docker run --rm helje5/rpi-swift bash -c "uname -a; swift --version"
298 |
299 | run :
300 | docker run --rm --interactive --tty helje5/rpi-swift
301 |
302 |
303 | fetch-swift-tarballs :
304 | wget https://www.dropbox.com/s/kmu5p6j0otz3jyr/swift-3.0.2-RPi23-RaspbianNov16.tgz
305 |
306 | publish :
307 | docker push helje5/rpi-swift
308 | docker push helje5/rpi-swift-dev
309 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
dockSwiftOnARM
2 |
4 |
5 |
6 | 
7 | 
8 | 
9 | 
10 | 
11 |
12 |
13 | Playing with dockerizing Swift for Raspberry Pi.
14 |
15 | Inspired by
16 | [uraimo/buildSwiftOnARM](https://github.com/uraimo/buildSwiftOnARM).
17 |
18 | Also note the companion project:
19 | [swift-mac2arm-x-compile-toolchain](https://github.com/AlwaysRightInstitute/swift-mac2arm-x-compile-toolchain),
20 | a cross compiler toolchain which allows you to build Raspi Swift binaries
21 | on macOS (and the reverse for the fun of it!).
22 |
23 | ### Running Swift w/ Docker on macOS
24 |
25 | Works:
26 |
27 | ```shell
28 | docker run --rm helje5/rpi-swift swift --version
29 | Swift version 3.1 (swift-3.1-RELEASE)
30 | Target: armv7-unknown-linux-gnueabihf
31 | ```
32 |
33 | There is also an image which includes Emacs, vi, etc:
34 | ```shell
35 | docker run -it --rm helje5/rpi-swift-dev bash
36 | ```
37 |
38 | Note that the REPL doesn't work on the Raspi.
39 |
40 | DockerHub:
41 | - [rpi-swift](https://hub.docker.com/r/helje5/rpi-swift/)
42 | - [rpi-swift-dev](https://hub.docker.com/r/helje5/rpi-swift-dev/)
43 | (w/ Emacs/vi/etc)
44 |
45 | Want to run Server Side Swift on a Raspberry Pi? Use
46 | [mod_swift](http://mod-swift.org/raspberrypi/).
47 |
48 | #### Versions
49 |
50 | As of 2018-04-05 the latest working Swift version for Raspi is Swift 3.1.1.
51 |
52 | We do provide a docker image for 4.1.0. It basically works, but isn't stable
53 | (e.g. crashes on some operations). It also doesn't include the Swift Package
54 | Manager.
55 |
56 | ### Setup Raspi w/ Docker and remote-control it from macOS
57 |
58 | Moved to Wiki:
59 | - [Setup Docker on Raspi](https://github.com/helje5/dockSwiftOnARM/wiki/Setup-Docker-on-Raspi)
60 | - [Remote Control Raspi Docker from Mac](https://github.com/helje5/dockSwiftOnARM/wiki/Remote-Control-Raspi-Docker) (via docker-machine)
61 |
62 | ### Building Swift w/ Docker on macOS
63 |
64 | Moved to Wiki:
65 | - [Building Swift in a Docker container](https://github.com/helje5/dockSwiftOnARM/wiki/Building-Swift-with--Docker) (either on a real Raspi or in macOS Docker QEmu)
66 |
67 | ### Status
68 |
69 | No idea, still investigating this :-)
70 |
71 | ### Who
72 |
73 | Brought to you by
74 | [Helge Heß](https://helgehess.eu).
75 | We like
76 | [feedback](https://twitter.com/ar_institute),
77 | GitHub stars,
78 | cool [contract work](http://zeezide.com/en/services/services.html),
79 | presumably any form of praise you can think of.
80 | We don't like people who are wrong.
81 |
82 | There is the [swift-arm](https://slackpass.io/swift-arm) Slack channel
83 | if you have questions about running Swift on ARM/Raspberry Pi.
84 |
--------------------------------------------------------------------------------
/arm64v8-4.1.x-futurejones/arm64v8-ubuntu-swift-4.1.x.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker build -t helje5/arm64v8-swift:4.1.0 \
4 | # -f arm64v8-4.1.0-futurejones/arm64v8-ubuntu-swift-4.1.0.dockerfile \
5 | # ./empty-ctx
6 | # docker run -i --tty --rm helje5/arm64v8-swift:4.1.0
7 | #
8 | FROM arm64v8/ubuntu:16.04
9 |
10 | LABEL maintainer "Helge Heß "
11 |
12 | ARG SWIFTPKG=https://packagecloud.io/swift-arm/debian/packages/debian/stretch/swift4_4.1_arm64.deb
13 |
14 | ENV DEBIAN_FRONTEND noninteractive
15 |
16 | RUN apt-get update
17 | RUN apt-get upgrade -y
18 |
19 | # Funny: libcurl3 provies libcurl.so.4 :-)
20 | # Maybe libpython3.5 makes libpython2.7 obsolete?
21 | RUN apt-get install -y \
22 | git \
23 | libedit2 \
24 | libpython2.7 libcurl3 libxml2 libicu55 \
25 | libc6-dev \
26 | libatomic1 \
27 | libpython3.5 \
28 | curl
29 |
30 | RUN bash -c "curl -s https://packagecloud.io/install/repositories/swift-arm/debian/script.deb.sh | bash"
31 |
32 | RUN apt-get install -y swift4
33 |
34 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
35 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
36 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
37 | ldconfig"
38 |
39 | RUN useradd -u 501 --create-home --shell /bin/bash swift
40 |
41 | USER swift
42 | WORKDIR /home/swift
43 |
--------------------------------------------------------------------------------
/arm64v8-4.2.0-futurejones/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile
2 |
3 | all:
4 | @echo "use 'build' target"
5 |
6 | build:
7 | time docker build -t helje5/arm64v8-swift:4.2.0 \
8 | -f arm64v8-ubuntu-swift-4.2.0.dockerfile \
9 | $(PWD)/../empty-ctx
10 | docker images | grep helje5/arm64v8
11 |
12 | publish:
13 | time docker push helje5/arm64v8-swift:4.2.0
14 |
--------------------------------------------------------------------------------
/arm64v8-4.2.0-futurejones/README.md:
--------------------------------------------------------------------------------
1 | # Personal Notes on Building the image
2 |
3 |
4 | Packages:
5 |
6 | - https://packagecloud.io/swift-arm/release/packages/ubuntu/bionic/swift4_4.2_arm64.deb
7 |
--------------------------------------------------------------------------------
/arm64v8-4.2.0-futurejones/arm64v8-ubuntu-swift-4.2.0.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker build -t helje5/arm64v8-swift:4.2.0 \
4 | # -f arm64v8-4.2.0-futurejones/arm64v8-ubuntu-swift-4.2.0.dockerfile \
5 | # ./empty-ctx
6 | # docker run -i --tty --rm helje5/arm64v8-swift:4.2.0
7 | #
8 | FROM arm64v8/ubuntu:18.04
9 |
10 | LABEL maintainer "Helge Heß "
11 |
12 | ARG SWIFTPKG=https://packagecloud.io/swift-arm/release/packages/ubuntu/bionic/swift4_4.2_arm64.deb
13 |
14 | ENV DEBIAN_FRONTEND noninteractive
15 |
16 | RUN apt-get update
17 | RUN apt-get upgrade -y
18 |
19 | # Funny: libcurl3 provies libcurl.so.4 :-)
20 | # Maybe libpython3.5 makes libpython2.7 obsolete?
21 | RUN apt-get install -y \
22 | git \
23 | libedit2 \
24 | libpython2.7 libcurl4 libxml2 libicu60 \
25 | libc6-dev \
26 | libatomic1 \
27 | libpython3.5 \
28 | curl
29 |
30 | RUN bash -c "curl -s https://packagecloud.io/install/repositories/swift-arm/release/script.deb.sh | bash"
31 |
32 | RUN apt-get install -y swift4=4.2
33 |
34 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
35 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
36 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
37 | ldconfig"
38 |
39 | RUN useradd -u 501 --create-home --shell /bin/bash swift
40 |
41 | USER swift
42 | WORKDIR /home/swift
43 |
--------------------------------------------------------------------------------
/arm64v8-4.2.1-futurejones/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile
2 |
3 | all:
4 | @echo "use 'build' target"
5 |
6 | build:
7 | time docker build -t helje5/arm64v8-swift:4.2.1 \
8 | -f arm64v8-ubuntu-swift-4.2.1.dockerfile \
9 | $(PWD)/../empty-ctx
10 | docker images | grep helje5/arm64v8
11 |
12 | publish:
13 | time docker push helje5/arm64v8-swift:4.2.1
14 |
--------------------------------------------------------------------------------
/arm64v8-4.2.1-futurejones/README.md:
--------------------------------------------------------------------------------
1 | # Personal Notes on Building the image
2 |
3 |
4 | Packages:
5 |
6 | - https://packagecloud.io/swift-arm/release/packages/ubuntu/bionic/swift4_4.2.1_arm64.deb
7 |
--------------------------------------------------------------------------------
/arm64v8-4.2.1-futurejones/arm64v8-ubuntu-swift-4.2.1.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker build -t helje5/arm64v8-swift:4.2.1 \
4 | # -f arm64v8-4.2.0-futurejones/arm64v8-ubuntu-swift-4.2.1.dockerfile \
5 | # ./empty-ctx
6 | # docker run -i --tty --rm helje5/arm64v8-swift:4.2.1
7 | #
8 | FROM arm64v8/ubuntu:18.04
9 |
10 | LABEL maintainer "Helge Heß "
11 |
12 | ARG SWIFTPKG=https://packagecloud.io/swift-arm/release/packages/ubuntu/bionic/swift4_4.2.1_arm64.deb
13 |
14 | ENV DEBIAN_FRONTEND noninteractive
15 |
16 | RUN apt-get update
17 | RUN apt-get upgrade -y
18 |
19 | RUN apt-get install -y \
20 | git \
21 | libedit2 \
22 | libpython2.7 libcurl4 libxml2 libicu60 \
23 | libc6-dev \
24 | libatomic1 \
25 | libpython3.5 \
26 | curl
27 |
28 | RUN bash -c "curl -s https://packagecloud.io/install/repositories/swift-arm/release/script.deb.sh | bash"
29 |
30 | RUN apt-get install -y swift4=4.2.1
31 |
32 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
33 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
34 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
35 | ldconfig"
36 |
37 | RUN useradd -u 501 --create-home --shell /bin/bash swift
38 |
39 | USER swift
40 | WORKDIR /home/swift
41 |
--------------------------------------------------------------------------------
/arm64v8-5.0.0-futurejones/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile
2 |
3 | CLOWN_URL="https://github.com"
4 | SWIFT_ARM_HERO="futurejones"
5 | PKG_DOWNLOAD_URL="$(CLOWN_URL)/$(SWIFT_ARM_HERO)/swift-arm64/releases/download"
6 |
7 | SWIFTVERSION="5.0"
8 | BUILDDATE="2019-03-26"
9 | SWIFT_FULL_VERSION="$(SWIFTVERSION).0"
10 |
11 | SWIFT_OS="ubuntu"
12 | SWIFT_OS_CAP="Ubuntu"
13 | SWIFTOSVERSION="16.04"
14 | SWIFT_CPU="aarch64"
15 |
16 | DOCKER_USER="helje5"
17 | DOCKER_CPU="arm64v8"
18 | DOCKER_IMAGE_NAME="$(DOCKER_CPU)-swift"
19 | DOCKER_FULL_VERSION_TAG=$(SWIFT_FULL_VERSION)
20 | DOCKER_LATEST_TAG=$(SWIFTVERSION)-latest
21 |
22 | DERIVED_TARBALL="v$(SWIFTVERSION)-$(SWIFT_OS)-$(SWIFTOSVERSION)/swift-$(SWIFTVERSION)-$(SWIFT_CPU)-RELEASE-$(SWIFT_OS_CAP)-$(SWIFTOSVERSION)_$(BUILDDATE).tar.gz"
23 |
24 | all:
25 | @echo "use 'make fetch' target to fetch tarball"
26 | @echo "use 'make build' target to build"
27 | @echo "use 'make run' to try the container"
28 |
29 | fetch :
30 | wget $(PKG_DOWNLOAD_URL)/$(DERIVED_TARBALL)
31 |
32 | build:
33 | time docker build \
34 | -t helje5/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG) \
35 | -t helje5/$(DOCKER_IMAGE_NAME):$(DOCKER_LATEST_TAG) \
36 | -f $(DOCKER_CPU)-$(SWIFT_OS)-$(SWIFTOSVERSION)-swift-$(SWIFT_FULL_VERSION).dockerfile \
37 | $(PWD)
38 | docker images | grep $(DOCKER_USER)/$(DOCKER_CPU)
39 |
40 | publish:
41 | time docker push $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG)
42 | time docker push $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_LATEST_TAG)
43 |
44 | run:
45 | docker run --rm --interactive --tty --name "swift-run" \
46 | $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG)
47 |
--------------------------------------------------------------------------------
/arm64v8-5.0.0-futurejones/README.md:
--------------------------------------------------------------------------------
1 | # Personal Notes on Building the image
2 |
3 | ```
4 | wget https://github.com/futurejones/swift-arm64/releases/download/v5.0-ubuntu-16.04/swift-5.0-aarch64-RELEASE-Ubuntu-16.04_2019-03-26.tar.gz
5 | ```
6 |
7 | Releases:
8 |
9 | - https://github.com/futurejones/swift-arm64/releases
10 |
--------------------------------------------------------------------------------
/arm64v8-5.0.0-futurejones/arm64v8-ubuntu-16.04-swift-5.0.0.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | FROM arm64v8/ubuntu:16.04
4 |
5 | LABEL maintainer "Helge Heß "
6 |
7 | ARG TARBALL=swift-5.0-aarch64-RELEASE-Ubuntu-16.04_2019-03-26.tar.gz
8 |
9 | ENV DEBIAN_FRONTEND noninteractive
10 |
11 | RUN apt-get update
12 | RUN apt-get upgrade -y
13 |
14 | # Funny: libcurl3 provies libcurl.so.4 :-)
15 | # Maybe libpython3.5 makes libpython2.7 obsolete?
16 | RUN apt-get install -y \
17 | git \
18 | libedit2 \
19 | libpython2.7 libcurl3 libxml2 libicu55 \
20 | libc6-dev \
21 | libatomic1 \
22 | libpython3.5 \
23 | curl
24 | # curl seems necessary to grab the right lib, didn't research which one
25 | # it is :-) /usr/lib/aarch64-linux-gnu/libcurl-* looks the same!
26 |
27 | # tarball starts at /
28 | ADD $TARBALL /
29 |
30 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
31 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
32 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
33 | ldconfig"
34 |
35 | RUN useradd -u 501 --create-home --shell /bin/bash swift
36 |
37 | USER swift
38 | WORKDIR /home/swift
39 |
--------------------------------------------------------------------------------
/arm64v8-5.3.2-futurejones/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile
2 |
3 | CLOWN_URL=https://github.com
4 | SWIFT_ARM_HERO=futurejones
5 | PKG_DOWNLOAD_URL="$(CLOWN_URL)/$(SWIFT_ARM_HERO)/swift-arm64/releases/download"
6 |
7 | SWIFTVERSION=5.3
8 | BUILDDATE=2021-01-16
9 | SWIFT_FULL_VERSION=$(SWIFTVERSION).2
10 |
11 | SWIFT_OS=ubuntu
12 | SWIFT_OS_CAP=Ubuntu
13 | SWIFTOSVERSION=18.04
14 | SWIFT_CPU=aarch64
15 |
16 | DOCKER_USER=helje5
17 | DOCKER_CPU=arm64v8
18 | DOCKER_IMAGE_NAME="$(DOCKER_CPU)-swift"
19 | DOCKER_FULL_VERSION_TAG=$(SWIFT_FULL_VERSION)
20 | DOCKER_LATEST_TAG=$(SWIFTVERSION)-latest
21 |
22 | DERIVED_TARBALL="v$(SWIFTVERSION)-$(SWIFT_OS)-$(SWIFTOSVERSION)/swift-$(SWIFTVERSION)-$(SWIFT_CPU)-RELEASE-$(SWIFT_OS_CAP)-$(SWIFTOSVERSION)_$(BUILDDATE).tar.gz"
23 |
24 | all:
25 | @echo "use 'make fetch' target to fetch tarball"
26 | @echo "use 'make build' target to build"
27 | @echo "use 'make run' to try the container"
28 |
29 | fetch :
30 | wget $(PKG_DOWNLOAD_URL)/$(DERIVED_TARBALL)
31 |
32 | build:
33 | time docker build \
34 | -t helje5/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG) \
35 | -t helje5/$(DOCKER_IMAGE_NAME):$(DOCKER_LATEST_TAG) \
36 | -f $(DOCKER_CPU)-$(SWIFT_OS)-$(SWIFTOSVERSION)-swift-$(SWIFT_FULL_VERSION).dockerfile \
37 | $(PWD)
38 | docker images | grep $(DOCKER_USER)/$(DOCKER_CPU)
39 |
40 | publish:
41 | time docker push $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG)
42 | time docker push $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_LATEST_TAG)
43 |
44 | run:
45 | docker run --rm --interactive --tty --name "swift-run" \
46 | $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG)
47 |
--------------------------------------------------------------------------------
/arm64v8-5.3.2-futurejones/README.md:
--------------------------------------------------------------------------------
1 | # Personal Notes on Building the image
2 |
3 | ```
4 | wget https://github.com/futurejones/swift-arm64/releases/download/v5.3.2-RELEASE/swiftlang-5.3.2-ubuntu-18.04-release-aarch64-3-2021-01-03.tar.gz
5 | ```
6 |
7 | Releases:
8 |
9 | - https://github.com/futurejones/swift-arm64/releases
10 |
--------------------------------------------------------------------------------
/arm64v8-5.3.2-futurejones/arm64v8-ubuntu-18.04-swift-5.3.2.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | FROM arm64v8/ubuntu:18.04
4 |
5 | LABEL maintainer "Helge Heß "
6 |
7 | ARG TARBALL=swiftlang-5.3.2-ubuntu-18.04-release-aarch64-3-2021-01-03.tar.gz
8 |
9 | ENV DEBIAN_FRONTEND noninteractive
10 |
11 | RUN apt-get update
12 | RUN apt-get upgrade -y
13 |
14 | # Maybe libpython3.5 makes libpython2.7 obsolete?
15 | RUN apt-get install -y \
16 | git \
17 | libedit2 \
18 | libpython2.7 libcurl4 libxml2 \
19 | libc6-dev \
20 | libatomic1 \
21 | libpython3.5 \
22 | curl
23 | # curl seems necessary to grab the right lib, didn't research which one
24 | # it is :-) /usr/lib/aarch64-linux-gnu/libcurl-* looks the same!
25 |
26 | # tarball starts at /
27 | ADD $TARBALL /
28 |
29 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
30 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
31 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
32 | ldconfig"
33 |
34 | RUN useradd -u 501 --create-home --shell /bin/bash swift
35 |
36 | USER swift
37 | WORKDIR /home/swift
38 |
--------------------------------------------------------------------------------
/arm64v8-5.5.1-futurejones/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile
2 |
3 | CLOWN_URL=https://github.com
4 | SWIFT_ARM_HERO=futurejones
5 | PKG_DOWNLOAD_URL="$(CLOWN_URL)/$(SWIFT_ARM_HERO)/swift-arm64/releases/download"
6 |
7 | SWIFTVERSION=5.5
8 | BUILDDATE=2021-10-29
9 | BUILDREV=01
10 | SWIFT_FULL_VERSION=$(SWIFTVERSION).1
11 | SWIFT_BRANCH=RELEASE
12 |
13 | SWIFT_OS=ubuntu
14 | SWIFT_OS_CAP=Ubuntu
15 | SWIFTOSVERSION=20.04
16 | SWIFT_CPU=aarch64
17 |
18 | DOCKER_USER=helje5
19 | DOCKER_CPU=arm64v8
20 | DOCKER_IMAGE_NAME="$(DOCKER_CPU)-swift"
21 | DOCKER_FULL_VERSION_TAG=$(SWIFT_FULL_VERSION)
22 | DOCKER_LATEST_TAG=$(SWIFTVERSION)-latest
23 |
24 | #DERIVED_TARBALL="v$(SWIFTVERSION)-$(SWIFT_OS)-$(SWIFTOSVERSION)/swift-$(SWIFTVERSION)-$(SWIFT_CPU)-RELEASE-$(SWIFT_OS_CAP)-$(SWIFTOSVERSION)_$(BUILDDATE).tar.gz"
25 | DERIVED_TARBALL="v$(SWIFT_FULL_VERSION)-$(SWIFT_BRANCH)/swiftlang-$(SWIFT_FULL_VERSION)-$(SWIFT_OS)-$(SWIFTOSVERSION)-release-$(SWIFT_CPU)-$(BUILDREV)-$(BUILDDATE).tar.gz"
26 |
27 | all:
28 | @echo "use 'make fetch' target to fetch tarball"
29 | @echo "use 'make build' target to build"
30 | @echo "use 'make run' to try the container"
31 |
32 | fetch :
33 | wget $(PKG_DOWNLOAD_URL)/$(DERIVED_TARBALL)
34 |
35 | build:
36 | time docker build \
37 | -t helje5/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG) \
38 | -t helje5/$(DOCKER_IMAGE_NAME):$(DOCKER_LATEST_TAG) \
39 | -f $(DOCKER_CPU)-$(SWIFT_OS)-$(SWIFTOSVERSION)-swift-$(SWIFT_FULL_VERSION).dockerfile \
40 | $(PWD)
41 | docker images | grep $(DOCKER_USER)/$(DOCKER_CPU)
42 |
43 | publish:
44 | time docker push $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG)
45 | time docker push $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_LATEST_TAG)
46 |
47 | run:
48 | docker run --rm --interactive --tty --name "swift-run" \
49 | $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG)
50 |
--------------------------------------------------------------------------------
/arm64v8-5.5.1-futurejones/README.md:
--------------------------------------------------------------------------------
1 | # Personal Notes on Building the image
2 |
3 | ```
4 | wget https://github.com/futurejones/swift-arm64/releases/download/v5.5.1-RELEASE/swiftlang-5.5.1-ubuntu-20.04-release-aarch64-01-2021-10-29.tar.gz
5 | ```
6 |
7 | Releases:
8 |
9 | - https://github.com/futurejones/swift-arm64/releases
10 |
--------------------------------------------------------------------------------
/arm64v8-5.5.1-futurejones/arm64v8-ubuntu-20.04-swift-5.5.1.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | FROM arm64v8/ubuntu:20.04
4 |
5 | LABEL maintainer "Helge Heß "
6 |
7 | ARG TARBALL=swiftlang-5.5.1-ubuntu-20.04-release-aarch64-01-2021-10-29.tar.gz
8 |
9 | ENV DEBIAN_FRONTEND noninteractive
10 |
11 | RUN apt-get update
12 | RUN apt-get upgrade -y
13 |
14 | # Maybe libpython3.5 makes libpython2.7 obsolete?
15 | RUN apt-get install -y \
16 | git \
17 | libedit2 \
18 | libpython2.7 libcurl4 libxml2 \
19 | libc6-dev \
20 | libatomic1 \
21 | libpython3.5 \
22 | curl
23 | # curl seems necessary to grab the right lib, didn't research which one
24 | # it is :-) /usr/lib/aarch64-linux-gnu/libcurl-* looks the same!
25 |
26 | # tarball starts at /
27 | ADD $TARBALL /
28 |
29 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
30 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
31 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
32 | ldconfig"
33 |
34 | RUN useradd -u 501 --create-home --shell /bin/bash swift
35 |
36 | USER swift
37 | WORKDIR /home/swift
38 |
--------------------------------------------------------------------------------
/arm64v8-5.5.3-futurejones/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile
2 |
3 | CLOWN_URL=https://github.com
4 | SWIFT_ARM_HERO=futurejones
5 | PKG_DOWNLOAD_URL="$(CLOWN_URL)/$(SWIFT_ARM_HERO)/swift-arm64/releases/download"
6 |
7 | SWIFTVERSION=5.5
8 | BUILDDATE=2022-02-10
9 | BUILDREV=01
10 | SWIFT_FULL_VERSION=$(SWIFTVERSION).3
11 | SWIFT_BRANCH=RELEASE
12 |
13 | SWIFT_OS=ubuntu
14 | SWIFT_OS_CAP=Ubuntu
15 | SWIFTOSVERSION=20.04
16 | SWIFT_CPU=aarch64
17 |
18 | DOCKER_USER=helje5
19 | DOCKER_CPU=arm64v8
20 | DOCKER_IMAGE_NAME="$(DOCKER_CPU)-swift"
21 | DOCKER_FULL_VERSION_TAG=$(SWIFT_FULL_VERSION)
22 | DOCKER_LATEST_TAG=$(SWIFTVERSION)-latest
23 |
24 | #DERIVED_TARBALL="v$(SWIFTVERSION)-$(SWIFT_OS)-$(SWIFTOSVERSION)/swift-$(SWIFTVERSION)-$(SWIFT_CPU)-RELEASE-$(SWIFT_OS_CAP)-$(SWIFTOSVERSION)_$(BUILDDATE).tar.gz"
25 | DERIVED_TARBALL="v$(SWIFT_FULL_VERSION)-$(SWIFT_BRANCH)/swiftlang-$(SWIFT_FULL_VERSION)-$(SWIFT_OS)-$(SWIFTOSVERSION)-release-$(SWIFT_CPU)-$(BUILDREV)-$(BUILDDATE).tar.gz"
26 |
27 | all:
28 | @echo "use 'make fetch' target to fetch tarball"
29 | @echo "use 'make build' target to build"
30 | @echo "use 'make run' to try the container"
31 |
32 | fetch :
33 | wget $(PKG_DOWNLOAD_URL)/$(DERIVED_TARBALL)
34 |
35 | build:
36 | time docker build \
37 | -t helje5/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG) \
38 | -t helje5/$(DOCKER_IMAGE_NAME):$(DOCKER_LATEST_TAG) \
39 | -f $(DOCKER_CPU)-$(SWIFT_OS)-$(SWIFTOSVERSION)-swift-$(SWIFT_FULL_VERSION).dockerfile \
40 | $(PWD)
41 | docker images | grep $(DOCKER_USER)/$(DOCKER_CPU)
42 |
43 | publish:
44 | time docker push $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG)
45 | time docker push $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_LATEST_TAG)
46 |
47 | run:
48 | docker run --rm --interactive --tty --name "swift-run" \
49 | $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG)
50 |
--------------------------------------------------------------------------------
/arm64v8-5.5.3-futurejones/README.md:
--------------------------------------------------------------------------------
1 | # Personal Notes on Building the image
2 |
3 | ```
4 | wget https://github.com/futurejones/swift-arm64/releases/download/v5.5.3-RELEASE/swiftlang-5.5.3-ubuntu-20.04-release-aarch64-01-2022-02-10.tar.gz
5 | ```
6 |
7 | Releases:
8 |
9 | - https://github.com/futurejones/swift-arm64/releases
10 |
--------------------------------------------------------------------------------
/arm64v8-5.5.3-futurejones/arm64v8-ubuntu-20.04-swift-5.5.3.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | FROM arm64v8/ubuntu:20.04
4 |
5 | LABEL maintainer "Helge Heß "
6 |
7 | ARG TARBALL=swiftlang-5.5.3-ubuntu-20.04-release-aarch64-01-2022-02-10.tar.gz
8 |
9 | ENV DEBIAN_FRONTEND noninteractive
10 |
11 | RUN apt-get update
12 | RUN apt-get upgrade -y
13 |
14 | # Maybe libpython3.5 makes libpython2.7 obsolete?
15 | RUN apt-get install -y \
16 | git \
17 | libedit2 \
18 | libpython2.7 libcurl4 libxml2 \
19 | libc6-dev \
20 | libatomic1 \
21 | libpython3.5 \
22 | curl
23 | # curl seems necessary to grab the right lib, didn't research which one
24 | # it is :-) /usr/lib/aarch64-linux-gnu/libcurl-* looks the same!
25 |
26 | # tarball starts at /
27 | ADD $TARBALL /
28 |
29 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
30 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
31 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
32 | ldconfig"
33 |
34 | RUN useradd -u 501 --create-home --shell /bin/bash swift
35 |
36 | USER swift
37 | WORKDIR /home/swift
38 |
--------------------------------------------------------------------------------
/arm64v8-5.7.2-futurejones/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile
2 |
3 | CLOWN_URL=https://github.com
4 | SWIFT_ARM_HERO=futurejones
5 | PKG_DOWNLOAD_URL="$(CLOWN_URL)/$(SWIFT_ARM_HERO)/swift-arm64/releases/download"
6 |
7 | SWIFTVERSION=5.7
8 | BUILDREV=01
9 | SWIFT_FULL_VERSION=$(SWIFTVERSION).2
10 | SWIFT_BRANCH=RELEASE
11 |
12 | SWIFT_OS=ubuntu
13 | SWIFT_OS_CAP=ubuntu
14 | SWIFTOSVERSION=focal
15 | SWIFT_CPU=aarch64
16 |
17 | DOCKER_USER=helje5
18 | DOCKER_CPU=arm64v8
19 | DOCKER_IMAGE_NAME="$(DOCKER_CPU)-swift"
20 | DOCKER_FULL_VERSION_TAG=$(SWIFT_FULL_VERSION)
21 | DOCKER_LATEST_TAG=$(SWIFTVERSION)-latest
22 |
23 | DERIVED_TARBALL="v$(SWIFT_FULL_VERSION)-$(SWIFT_BRANCH)/swiftlang-$(SWIFT_FULL_VERSION)-$(SWIFT_BRANCH)-$(SWIFT_CPU)-$(SWIFT_OS)-$(SWIFTOSVERSION).tar.gz"
24 |
25 | all:
26 | @echo "use 'make fetch' target to fetch tarball"
27 | @echo "use 'make build' target to build"
28 | @echo "use 'make run' to try the container"
29 |
30 | fetch :
31 | wget $(PKG_DOWNLOAD_URL)/$(DERIVED_TARBALL)
32 |
33 | build:
34 | time docker build \
35 | -t helje5/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG) \
36 | -t helje5/$(DOCKER_IMAGE_NAME):$(DOCKER_LATEST_TAG) \
37 | -f $(DOCKER_CPU)-$(SWIFT_OS)-$(SWIFTOSVERSION)-swift-$(SWIFT_FULL_VERSION).dockerfile \
38 | $(PWD)
39 | docker images | grep $(DOCKER_USER)/$(DOCKER_CPU)
40 |
41 | publish:
42 | time docker push $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG)
43 | time docker push $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_LATEST_TAG)
44 |
45 | run:
46 | docker run --rm --interactive --tty --name "swift-run" \
47 | $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG)
48 |
--------------------------------------------------------------------------------
/arm64v8-5.7.2-futurejones/README.md:
--------------------------------------------------------------------------------
1 | # Personal Notes on Building the image
2 |
3 | ```
4 | wget
5 | https://github.com/futurejones/swift-arm64/releases/download/v5.7.2-RELEASE/swiftlang-5.7.2-RELEASE-aarch64-ubuntu-focal.tar.gz
6 | ```
7 |
8 | Releases:
9 |
10 | - https://github.com/futurejones/swift-arm64/releases
11 |
--------------------------------------------------------------------------------
/arm64v8-5.7.2-futurejones/arm64v8-ubuntu-focal-swift-5.7.2.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | FROM arm64v8/ubuntu:20.04
4 |
5 | LABEL maintainer "Helge Heß "
6 |
7 | ARG TARBALL=swiftlang-5.7.2-RELEASE-aarch64-ubuntu-focal.tar.gz
8 |
9 | ENV DEBIAN_FRONTEND noninteractive
10 |
11 | RUN apt-get update
12 | RUN apt-get upgrade -y
13 |
14 | # Maybe libpython3.5 makes libpython2.7 obsolete?
15 | RUN apt-get install -y \
16 | git \
17 | libedit2 \
18 | libpython2.7 libcurl4 libxml2 \
19 | libc6-dev \
20 | libatomic1 \
21 | libpython3.5 \
22 | curl
23 | # curl seems necessary to grab the right lib, didn't research which one
24 | # it is :-) /usr/lib/aarch64-linux-gnu/libcurl-* looks the same!
25 |
26 | # tarball starts at /
27 | ADD $TARBALL /
28 |
29 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
30 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
31 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
32 | ldconfig"
33 |
34 | RUN useradd -u 501 --create-home --shell /bin/bash swift
35 |
36 | USER swift
37 | WORKDIR /home/swift
38 |
--------------------------------------------------------------------------------
/empty-ctx/arm64v8-swift-4.1.0-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker build -t helje5/arm64v8-swift-dev:4.1.0 \
4 | # -f empty-ctx/arm64v8-swift-4.1.0-dev.dockerfile \
5 | # ./empty-ctx
6 | # docker run -i --tty --name "swift-dev" --rm helje5/arm64v8-swift-dev:4.1.0
7 | #
8 | FROM helje5/arm64v8-swift:4.1.0
9 |
10 | LABEL maintainer "Helge Heß "
11 |
12 | # rpi-swift sets it to swift
13 | USER root
14 |
15 | ENV DEBIAN_FRONTEND noninteractive
16 |
17 | ARG CLANG_VERSION=3.8
18 |
19 | RUN apt-get install -y apt-utils \
20 | vim emacs make \
21 | git libicu55 libedit2
22 |
23 | # rpi-swift is installing stuff into site-packages, need to move them away
24 | RUN bash -c "\
25 | mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift; \
26 | apt-get install -y python2.7-minimal; \
27 | mv /usr/lib/python2.7/site-packages.swift/* \
28 | /usr/local/lib/python2.7/dist-packages/; \
29 | rmdir /usr/lib/python2.7/site-packages.swift \
30 | "
31 |
32 | RUN apt-get install -y \
33 | python \
34 | \
35 | clang-$CLANG_VERSION libxml2-dev bison lsb-release gdb \
36 | \
37 | libicu-dev \
38 | autoconf libtool pkg-config \
39 | libblocksruntime-dev \
40 | libpthread-workqueue-dev \
41 | systemtap-sdt-dev \
42 | libbsd-dev libbsd0 \
43 | curl libcurl4-openssl-dev \
44 | libedit-dev \
45 | libxml2 \
46 | wget sudo gosu \
47 | zlib1g-dev \
48 | libsqlite3-dev \
49 | telnet netcat \
50 | inetutils-ping dialog \
51 | nfs-common
52 |
53 | RUN bash -c "update-alternatives --quiet --install /usr/bin/clang \
54 | clang /usr/bin/clang-$CLANG_VERSION 100;\
55 | update-alternatives --quiet --install /usr/bin/clang++ \
56 | clang++ /usr/bin/clang++-$CLANG_VERSION 100"
57 |
58 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
59 |
60 | RUN bash -c "\
61 | adduser swift sudo; \
62 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
63 | chmod 0440 /etc/sudoers.d/swift; \
64 | echo 'swift:swift' | chpasswd \
65 | "
66 |
67 | USER swift
68 | WORKDIR /home/swift
69 |
70 | RUN bash -c "\
71 | mkdir -p /home/swift/.emacs.d/lisp; \
72 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
73 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
74 | echo \"(require 'swift-mode)\"; >> .emacs \
75 | echo \"(setq-default indent-tabs-mode nil)\" >> .emacs \
76 | "
77 |
--------------------------------------------------------------------------------
/empty-ctx/arm64v8-swift-4.1.1-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker build -t helje5/arm64v8-swift-dev:4.1.0 \
4 | # -f empty-ctx/arm64v8-swift-4.1.0-dev.dockerfile \
5 | # ./empty-ctx
6 | # docker run -i --tty --name "swift-dev" --rm helje5/arm64v8-swift-dev:4.1.0
7 | #
8 | FROM helje5/arm64v8-swift:4.1.1
9 |
10 | LABEL maintainer "Helge Heß "
11 |
12 | # rpi-swift sets it to swift
13 | USER root
14 |
15 | ENV DEBIAN_FRONTEND noninteractive
16 |
17 | ARG CLANG_VERSION=3.8
18 |
19 | RUN apt-get install -y apt-utils \
20 | vim emacs make \
21 | git libicu55 libedit2
22 |
23 | # rpi-swift is installing stuff into site-packages, need to move them away
24 | RUN bash -c "\
25 | mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift; \
26 | apt-get install -y python2.7-minimal; \
27 | mv /usr/lib/python2.7/site-packages.swift/* \
28 | /usr/local/lib/python2.7/dist-packages/; \
29 | rmdir /usr/lib/python2.7/site-packages.swift \
30 | "
31 |
32 | RUN apt-get install -y \
33 | python \
34 | \
35 | clang-$CLANG_VERSION libxml2-dev bison lsb-release gdb \
36 | \
37 | libicu-dev \
38 | autoconf libtool pkg-config \
39 | libblocksruntime-dev \
40 | libpthread-workqueue-dev \
41 | systemtap-sdt-dev \
42 | libbsd-dev libbsd0 \
43 | curl libcurl4-openssl-dev \
44 | libedit-dev \
45 | libxml2 \
46 | wget sudo gosu \
47 | zlib1g-dev \
48 | libsqlite3-dev \
49 | telnet netcat \
50 | inetutils-ping dialog \
51 | nfs-common
52 |
53 | RUN bash -c "update-alternatives --quiet --install /usr/bin/clang \
54 | clang /usr/bin/clang-$CLANG_VERSION 100;\
55 | update-alternatives --quiet --install /usr/bin/clang++ \
56 | clang++ /usr/bin/clang++-$CLANG_VERSION 100"
57 |
58 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
59 |
60 | RUN bash -c "\
61 | adduser swift sudo; \
62 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
63 | chmod 0440 /etc/sudoers.d/swift; \
64 | echo 'swift:swift' | chpasswd \
65 | "
66 |
67 | USER swift
68 | WORKDIR /home/swift
69 |
70 | RUN bash -c "\
71 | mkdir -p /home/swift/.emacs.d/lisp; \
72 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
73 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
74 | echo \"(require 'swift-mode)\"; >> .emacs \
75 | echo \"(setq-default indent-tabs-mode nil)\" >> .emacs \
76 | "
77 |
--------------------------------------------------------------------------------
/empty-ctx/arm64v8-swift-4.2.1-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run -i --tty --name "swift-dev" --rm helje5/rpi-swift-dev:4.1.2
4 | #
5 | FROM helje5/arm64v8-swift:4.2.1
6 |
7 | LABEL maintainer "Helge Heß "
8 |
9 | # rpi-swift sets it to swift
10 | USER root
11 |
12 | ENV DEBIAN_FRONTEND noninteractive
13 |
14 | RUN apt-get install -y apt-utils \
15 | vim emacs make \
16 | git libedit2
17 |
18 | # rpi-swift is installing stuff into site-packages, need to move them away
19 | RUN bash -c "\
20 | mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift; \
21 | apt-get install -y python2.7-minimal; \
22 | mv /usr/lib/python2.7/site-packages.swift/* \
23 | /usr/local/lib/python2.7/dist-packages/; \
24 | rmdir /usr/lib/python2.7/site-packages.swift \
25 | "
26 |
27 | # libkqueue-dev \
28 | RUN apt-get install -y \
29 | python \
30 | \
31 | clang libxml2-dev bison lsb-release gdb \
32 | \
33 | libicu-dev \
34 | autoconf libtool pkg-config \
35 | libblocksruntime-dev \
36 | libpthread-workqueue-dev \
37 | systemtap-sdt-dev \
38 | libbsd-dev libbsd0 \
39 | curl libcurl4-openssl-dev \
40 | libedit-dev \
41 | libxml2 \
42 | wget sudo gosu \
43 | zlib1g-dev \
44 | libsqlite3-dev \
45 | telnet netcat \
46 | inetutils-ping dialog \
47 | nfs-common
48 |
49 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
50 |
51 | RUN bash -c "\
52 | adduser swift sudo; \
53 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
54 | chmod 0440 /etc/sudoers.d/swift; \
55 | echo 'swift:swift' | chpasswd \
56 | "
57 |
58 | USER swift
59 | WORKDIR /home/swift
60 |
61 | RUN bash -c "\
62 | mkdir -p /home/swift/.emacs.d/lisp; \
63 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
64 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
65 | echo \"(require 'swift-mode)\" >> .emacs; \
66 | echo \"(setq-default indent-tabs-mode nil)\" >> .emacs \
67 | "
68 |
--------------------------------------------------------------------------------
/empty-ctx/arm64v8-swift-5.0.0-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | FROM helje5/arm64v8-swift:5.0.0
4 |
5 | LABEL maintainer "Helge Heß "
6 |
7 | # rpi-swift sets it to swift
8 | USER root
9 |
10 | ENV DEBIAN_FRONTEND noninteractive
11 |
12 | RUN apt-get install -y apt-utils \
13 | vim emacs make \
14 | git libedit2
15 |
16 | # rpi-swift is installing stuff into site-packages, need to move them away
17 | RUN bash -c "\
18 | mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift; \
19 | apt-get install -y python2.7-minimal; \
20 | mv /usr/lib/python2.7/site-packages.swift/* \
21 | /usr/local/lib/python2.7/dist-packages/; \
22 | rmdir /usr/lib/python2.7/site-packages.swift \
23 | "
24 |
25 | # libkqueue-dev \
26 | RUN apt-get install -y \
27 | python \
28 | \
29 | clang libxml2-dev bison lsb-release gdb \
30 | \
31 | libicu-dev \
32 | autoconf libtool pkg-config \
33 | libblocksruntime-dev \
34 | libpthread-workqueue-dev \
35 | systemtap-sdt-dev \
36 | libbsd-dev libbsd0 \
37 | curl libcurl4-openssl-dev \
38 | libedit-dev \
39 | libxml2 \
40 | wget sudo gosu \
41 | zlib1g-dev \
42 | libsqlite3-dev \
43 | telnet netcat \
44 | inetutils-ping dialog \
45 | nfs-common
46 |
47 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
48 |
49 | RUN bash -c "\
50 | adduser swift sudo; \
51 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
52 | chmod 0440 /etc/sudoers.d/swift; \
53 | echo 'swift:swift' | chpasswd \
54 | "
55 |
56 | USER swift
57 | WORKDIR /home/swift
58 |
59 | RUN bash -c "\
60 | mkdir -p /home/swift/.emacs.d/lisp; \
61 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
62 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
63 | echo \"(require 'swift-mode)\" >> .emacs; \
64 | echo \"(setq-default indent-tabs-mode nil)\" >> .emacs \
65 | "
66 |
--------------------------------------------------------------------------------
/empty-ctx/arm64v8-swift-5.3.2-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | FROM helje5/arm64v8-swift:5.3.2
4 |
5 | LABEL maintainer "Helge Heß "
6 |
7 | # rpi-swift sets it to swift
8 | USER root
9 |
10 | ENV DEBIAN_FRONTEND noninteractive
11 |
12 | RUN apt-get install -y apt-utils \
13 | vim emacs make \
14 | git libedit2
15 |
16 | # rpi-swift is installing stuff into site-packages, need to move them away
17 | RUN bash -c "\
18 | mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift; \
19 | apt-get install -y python2.7-minimal\
20 | "
21 |
22 | # libkqueue-dev \
23 | RUN apt-get install -y \
24 | python \
25 | \
26 | clang libxml2-dev bison lsb-release gdb \
27 | \
28 | libicu-dev \
29 | autoconf libtool pkg-config \
30 | libblocksruntime-dev \
31 | libpthread-workqueue-dev \
32 | systemtap-sdt-dev \
33 | libbsd-dev libbsd0 \
34 | curl libcurl4-openssl-dev \
35 | libedit-dev \
36 | libxml2 \
37 | wget sudo gosu \
38 | zlib1g-dev \
39 | libsqlite3-dev \
40 | telnet netcat \
41 | inetutils-ping dialog \
42 | nfs-common
43 |
44 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
45 |
46 | RUN bash -c "\
47 | adduser swift sudo; \
48 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
49 | chmod 0440 /etc/sudoers.d/swift; \
50 | echo 'swift:swift' | chpasswd \
51 | "
52 |
53 | USER swift
54 | WORKDIR /home/swift
55 |
56 | RUN bash -c "\
57 | mkdir -p /home/swift/.emacs.d/lisp; \
58 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
59 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
60 | echo \"(require 'swift-mode)\" >> .emacs; \
61 | echo \"(setq-default indent-tabs-mode nil)\" >> .emacs \
62 | "
63 |
--------------------------------------------------------------------------------
/empty-ctx/arm64v8-swift-5.5.1-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | FROM helje5/arm64v8-swift:5.5.1
4 |
5 | LABEL maintainer "Helge Heß "
6 |
7 | # rpi-swift sets it to swift
8 | USER root
9 |
10 | ENV DEBIAN_FRONTEND noninteractive
11 |
12 | RUN apt-get update
13 |
14 | RUN apt-get install -y apt-utils \
15 | vim emacs make \
16 | git libedit2
17 |
18 | # rpi-swift is installing stuff into site-packages, need to move them away
19 | RUN bash -c "\
20 | mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift; \
21 | apt-get install -y python2.7-minimal\
22 | "
23 |
24 | # libkqueue-dev \
25 | RUN apt-get install -y \
26 | python \
27 | \
28 | clang libxml2-dev bison lsb-release gdb \
29 | \
30 | libicu-dev \
31 | autoconf libtool pkg-config \
32 | libblocksruntime-dev \
33 | libpthread-workqueue-dev \
34 | systemtap-sdt-dev \
35 | libbsd-dev libbsd0 \
36 | curl libcurl4-openssl-dev \
37 | libedit-dev \
38 | libxml2 \
39 | wget sudo gosu \
40 | zlib1g-dev \
41 | libsqlite3-dev \
42 | telnet netcat \
43 | inetutils-ping dialog \
44 | nfs-common
45 |
46 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
47 |
48 | RUN bash -c "\
49 | adduser swift sudo; \
50 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
51 | chmod 0440 /etc/sudoers.d/swift; \
52 | echo 'swift:swift' | chpasswd \
53 | "
54 |
55 | USER swift
56 | WORKDIR /home/swift
57 |
58 | RUN bash -c "\
59 | mkdir -p /home/swift/.emacs.d/lisp; \
60 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
61 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
62 | echo \"(require 'swift-mode)\" >> .emacs; \
63 | echo \"(setq-default indent-tabs-mode nil)\" >> .emacs \
64 | "
65 |
--------------------------------------------------------------------------------
/empty-ctx/arm64v8-swift-5.5.3-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | FROM helje5/arm64v8-swift:5.5.3
4 |
5 | LABEL maintainer "Helge Heß "
6 |
7 | # rpi-swift sets it to swift
8 | USER root
9 |
10 | ENV DEBIAN_FRONTEND noninteractive
11 |
12 | RUN apt-get update
13 |
14 | RUN apt-get install -y apt-utils \
15 | vim emacs make \
16 | git libedit2
17 |
18 | # rpi-swift is installing stuff into site-packages, need to move them away
19 | RUN bash -c "\
20 | mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift; \
21 | apt-get install -y python2.7-minimal\
22 | "
23 |
24 | # libkqueue-dev \
25 | RUN apt-get install -y \
26 | python \
27 | \
28 | clang libxml2-dev bison lsb-release gdb \
29 | \
30 | libicu-dev \
31 | autoconf libtool pkg-config \
32 | libblocksruntime-dev \
33 | libpthread-workqueue-dev \
34 | systemtap-sdt-dev \
35 | libbsd-dev libbsd0 \
36 | curl libcurl4-openssl-dev \
37 | libedit-dev \
38 | libxml2 \
39 | wget sudo gosu \
40 | zlib1g-dev \
41 | libsqlite3-dev \
42 | telnet netcat \
43 | inetutils-ping dialog \
44 | nfs-common
45 |
46 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
47 |
48 | RUN bash -c "\
49 | adduser swift sudo; \
50 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
51 | chmod 0440 /etc/sudoers.d/swift; \
52 | echo 'swift:swift' | chpasswd \
53 | "
54 |
55 | USER swift
56 | WORKDIR /home/swift
57 |
58 | RUN bash -c "\
59 | mkdir -p /home/swift/.emacs.d/lisp; \
60 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
61 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
62 | echo \"(require 'swift-mode)\" >> .emacs; \
63 | echo \"(setq-default indent-tabs-mode nil)\" >> .emacs \
64 | "
65 |
--------------------------------------------------------------------------------
/empty-ctx/arm64v8-swift-5.7.2-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | FROM helje5/arm64v8-swift:5.7.2
4 |
5 | LABEL maintainer "Helge Heß "
6 |
7 | # rpi-swift sets it to swift
8 | USER root
9 |
10 | ENV DEBIAN_FRONTEND noninteractive
11 |
12 | RUN apt-get update
13 |
14 | RUN apt-get install -y apt-utils \
15 | vim emacs make \
16 | git libedit2
17 |
18 | # rpi-swift is installing stuff into site-packages, need to move them away
19 | RUN bash -c "\
20 | mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift; \
21 | apt-get install -y python2.7-minimal\
22 | "
23 |
24 | # libkqueue-dev \
25 | RUN apt-get install -y \
26 | python \
27 | \
28 | clang libxml2-dev bison lsb-release gdb \
29 | \
30 | libicu-dev \
31 | autoconf libtool pkg-config \
32 | libblocksruntime-dev \
33 | libpthread-workqueue-dev \
34 | systemtap-sdt-dev \
35 | libbsd-dev libbsd0 \
36 | curl libcurl4-openssl-dev \
37 | libedit-dev \
38 | libxml2 \
39 | wget sudo gosu \
40 | zlib1g-dev \
41 | libsqlite3-dev \
42 | telnet netcat \
43 | inetutils-ping dialog \
44 | nfs-common
45 |
46 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
47 |
48 | RUN bash -c "\
49 | adduser swift sudo; \
50 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
51 | chmod 0440 /etc/sudoers.d/swift; \
52 | echo 'swift:swift' | chpasswd \
53 | "
54 |
55 | USER swift
56 | WORKDIR /home/swift
57 |
58 | RUN bash -c "\
59 | mkdir -p /home/swift/.emacs.d/lisp; \
60 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
61 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
62 | echo \"(require 'swift-mode)\" >> .emacs; \
63 | echo \"(setq-default indent-tabs-mode nil)\" >> .emacs \
64 | "
65 |
--------------------------------------------------------------------------------
/empty-ctx/build-3.1.1.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | apt-get update
4 | apt-get install -y \
5 | patch git \
6 | libedit2 \
7 | libpython2.7 \
8 | curl libxml2 \
9 | python3 \
10 | cmake ninja-build clang-3.8 python uuid-dev libicu-dev \
11 | icu-devtools libbsd-dev libedit-dev libxml2-dev libsqlite3-dev \
12 | swig libpython-dev libncurses5-dev pkg-config libblocksruntime-dev \
13 | libcurl4-openssl-dev autoconf libtool systemtap-sdt-dev \
14 | automake make m4 \
15 | lsb-release
16 |
17 | update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100
18 | update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100
19 |
20 | # grab Swift
21 | git clone https://github.com/helje5/dockSwiftOnARM.git
22 | cd dockSwiftOnARM
23 | ./grab-swift.sh
24 | ./make-swift-branch-tarball.sh swift-checkout swift-3.1.1-RELEASE
25 |
26 | mv swift-checkout /swiftsrc
27 | cd /swiftsrc/
28 |
29 | # patches
30 | curl -L -o swift-llvm-fdfc8ed7.diff \
31 | https://github.com/swift-arm/swift-llvm/commit/95581a28b69cc7ea811055891b499576fdfc8ed7.diff
32 | curl -L -o swift-corelibs-libdispatch-233.diff \
33 | https://github.com/apple/swift-corelibs-libdispatch/pull/233.diff
34 | cd swift-corelibs-libdispatch && \
35 | patch -l -p1 < ../swift-corelibs-libdispatch-233.diff; cd ..
36 | cd llvm && patch -l -p1 < ../swift-llvm-fdfc8ed7.diff; cd ..
37 |
38 | # patch build script
39 | mv swift/utils/build-script swift/utils/build-script.orig
40 | cat swift/utils/build-script.orig \
41 | | sed '/import sys/a sys.path.append(os.path.join(os.path.dirname(__file__), \"swift_build_support\"))'
42 | | sed '/import sys/a sys.path = sys.path[1:]' >> swift/utils/build-script
43 | chmod +x swift/utils/build-script
44 |
45 | export REL=3.1.1
46 | export INSTALL_DIR=$PWD/install
47 | export PACKAGE=$PWD/swift-${REL}.tgz
48 | export BRANCH=swift-3.1.1-RELEASE
49 | export SWIFT_SOURCE_ROOT=/swiftsrc
50 |
51 | ./swift/utils/build-script --build-subdir buildbot_linux -R \
52 | --lldb --llbuild --xctest --swiftpm --foundation --libdispatch \
53 | -- --install-libdispatch --install-foundation --install-swift \
54 | --install-lldb --install-llbuild --install-xctest --install-swiftpm \
55 | --install-prefix=/usr \
56 | '--swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;dev' \
57 | --build-swift-static-stdlib --build-swift-static-sdk-overlay \
58 | --install-destdir=$INSTALL_DIR --installable-package=$PACKAGE
59 |
60 |
61 | echo "+ Fixing up the install package for ARM"
62 |
63 | cp -R swift-corelibs-libdispatch/dispatch/ ${INSTALL_DIR}/usr/lib/swift
64 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/swift/Dispatch.swiftdoc \
65 | ${INSTALL_DIR}/usr/lib/swift/linux/armv7/
66 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/swift/Dispatch.swiftmodule \
67 | ${INSTALL_DIR}/usr/lib/swift/linux/armv7/
68 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/libdispatch.la \
69 | ${INSTALL_DIR}/usr/lib/swift/linux/
70 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/.libs/libdispatch.so \
71 | ${INSTALL_DIR}/usr/lib/swift/linux
72 | mkdir -p ${INSTALL_DIR}/usr/lib/swift/os
73 | cp swift-corelibs-libdispatch/os/linux_base.h ${INSTALL_DIR}/usr/lib/swift/os
74 | cp swift-corelibs-libdispatch/os/object.h ${INSTALL_DIR}/usr/lib/swift/os
75 |
76 |
77 | echo "+ Retar installation package"
78 |
79 | tar -C ${INSTALL_DIR} -czf ${PACKAGE} .
80 |
81 |
82 | #tar zcf "/package/swift-3.1-$(uname -m)-$(lsb_release -i -s | tr A-Z a-z)-$(lsb_release -r -s).tar.gz" *
83 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-mod_swift-demo-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run -i --tty --rm -p 8042:8042 modswift/rpi-mod_swift-demo-dev
4 | #
5 | # LD_LIBRARY_PATH="$PWD/.libs:$LD_LIBRARY_PATH" \
6 | # EXPRESS_VIEWS=mods_expressdemo/views apache2 \
7 | # -X -d $PWD -f apache-ubuntu.conf
8 | #
9 | FROM modswift/rpi-mod_swift-demo
10 |
11 | # rpi-swift sets it to swift
12 | USER root
13 |
14 | ENV DEBIAN_FRONTEND noninteractive
15 |
16 | RUN apt-get install -y vim emacs make wget sudo
17 |
18 |
19 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
20 |
21 | RUN adduser swift sudo
22 | RUN echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift
23 | RUN chmod 0440 /etc/sudoers.d/swift
24 | RUN echo 'swift:swift' | chpasswd
25 |
26 |
27 | USER swift
28 |
29 | ARG MOD_SWIFT_VERSION=0.7.6
30 | WORKDIR /home/swift/mod_swift-$MOD_SWIFT_VERSION
31 |
32 | CMD bash
33 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-mod_swift-demo.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run -p 8042:8042 -d --name mod_swift modswift/rpi-mod_swift-demo
4 | #
5 | FROM helje5/rpi-swift:3.1.0
6 |
7 | ARG MOD_SWIFT_VERSION=0.7.6
8 | ARG CLANG_VERSION=3.8
9 |
10 | # rpi-swift sets it to swift
11 | USER root
12 |
13 | ENV DEBIAN_FRONTEND noninteractive
14 |
15 | # rpi-swift is installing stuff into site-packages, need to move them away
16 | RUN mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift
17 | RUN apt-get install -y python2.7-minimal
18 | RUN mv /usr/lib/python2.7/site-packages.swift/* /usr/local/lib/python2.7/dist-packages/
19 | RUN rmdir /usr/lib/python2.7/site-packages.swift
20 |
21 | RUN apt-get install -y python
22 |
23 | RUN apt-get install -y clang-$CLANG_VERSION libc6-dev
24 |
25 | RUN apt-get install -y \
26 | libicu-dev \
27 | autoconf libtool pkg-config \
28 | libblocksruntime-dev \
29 | libkqueue-dev \
30 | libpthread-workqueue-dev \
31 | systemtap-sdt-dev \
32 | libbsd-dev libbsd0 \
33 | curl libcurl4-openssl-dev \
34 | libedit-dev \
35 | libxml2
36 |
37 | RUN update-alternatives --quiet --install /usr/bin/clang clang /usr/bin/clang-$CLANG_VERSION 100
38 | RUN update-alternatives --quiet --install /usr/bin/clang++ clang++ /usr/bin/clang++-$CLANG_VERSION 100
39 |
40 |
41 | RUN apt-get install -y wget curl \
42 | autoconf libtool pkg-config \
43 | apache2 apache2-dev libaprutil1-dbd-sqlite3
44 | RUN a2enmod dbd
45 |
46 | # dirty hack to get Swift module for APR working on Linux
47 | # (Note: I've found a better way, stay tuned.)
48 | RUN bash -c "\
49 | head -n -6 /usr/include/apr-1.0/apr.h \
50 | | sed 's/typedef off64_t/typedef apr_int64_t/' > /tmp/zz-apr.h; \
51 | echo '' >> /tmp/zz-apr.h; \
52 | echo '// mod_swift build hack' >> /tmp/zz-apr.h; \
53 | echo 'typedef int pid_t;' >> /tmp/zz-apr.h; \
54 | tail -n 6 /usr/include/apr-1.0/apr.h >> /tmp/zz-apr.h; \
55 | mv /usr/include/apr-1.0/apr.h /usr/include/apr-1.0/apr-original.h; \
56 | mv /tmp/zz-apr.h /usr/include/apr-1.0/apr.h"
57 |
58 |
59 | USER swift
60 |
61 | RUN bash -c "curl -L https://github.com/AlwaysRightInstitute/mod_swift/archive/$MOD_SWIFT_VERSION.tar.gz | tar zx"
62 |
63 | WORKDIR /home/swift/mod_swift-$MOD_SWIFT_VERSION
64 |
65 | RUN make all
66 |
67 | EXPOSE 8042
68 |
69 |
70 | # hack SQLite3 DB path, which has to be absolute
71 | RUN sed < apache-ubuntu.conf \
72 | "s#/home/helge/dev/Swift/mod_swift-helje5#/home/swift/mod_swift-0.7.6#" \
73 | | sed "s/#LoadModule dbd_module/LoadModule dbd_module/g" \
74 | > apache-ubuntu-hack.conf
75 |
76 | CMD LD_LIBRARY_PATH="$PWD/.libs:$LD_LIBRARY_PATH" \
77 | EXPRESS_VIEWS=mods_expressdemo/views apache2 \
78 | -X -d $PWD -f apache-ubuntu-hack.conf
79 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-raspbian-swift-3.0.2-build.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # https://github.com/uraimo/buildSwiftOnARM.git
4 | #
5 | # docker run --rm --interactive --tty helje5/rpi-swift-build
6 |
7 | FROM helje5/rpi-raspbian-swift-build302-env
8 |
9 | ENV DEBIAN_FRONTEND noninteractive
10 |
11 | # swiftsrc is in /swiftsrc
12 |
13 | RUN bash -c 'git clone https://github.com/uraimo/buildSwiftOnARM.git; \
14 | cd buildSwiftOnARM; \
15 | git archive -9 --format tgz tags/3.0.2 -o ../buildSwiftOnARM-3.0.2.tgz; \
16 | cd ..; \
17 | rm -rf buildSwiftOnARM; \
18 | cd /swiftsrc; \
19 | tar zxf ../buildSwiftOnARM-3.0.2.tgz; \
20 | rm ../buildSwiftOnARM-3.0.2.tgz'
21 |
22 | WORKDIR /swiftsrc
23 |
24 | RUN bash -c "for DIR in *; do \
25 | if test -d \"\${DIR}\"; then \
26 | if test -d \"\${DIR}.diffs\"; then \
27 | echo \"Applying patches to \${DIR}\" ; \
28 | cd \"\${DIR}\"; \
29 | patch -p1 < ../\${DIR}.diffs/*.diff; \
30 | cd ..; \
31 | fi; \
32 | fi; \
33 | done"
34 |
35 | ENV SWIFT_SOURCE_ROOT /swiftsrc
36 |
37 | # this fails because the script patches the PYTHONPATH so that
38 | # swiftsrc/swift/utils is before swiftsrc/swift/utils/swift_build_support
39 | # (and hence picks up the duplicate swift_build_support directory)
40 | # sys.path.append(os.path.dirname(__file__)) ...
41 | RUN bash -c "mv swift/utils/build-script swift/utils/build-script.orig; \
42 | cat swift/utils/build-script.orig \
43 | | sed '/import sys/a sys.path.append(os.path.join(os.path.dirname(__file__), \"swift_build_support\"))' \
44 | | sed '/import sys/a sys.path = sys.path[1:]' \
45 | >> swift/utils/build-script; \
46 | chmod +x swift/utils/build-script"
47 |
48 | RUN ./build.sh
49 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-raspbian-swift-3.0.2-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | FROM helje5/rpi-swift:3.0.2
4 |
5 | ENV DEBIAN_FRONTEND noninteractive
6 |
7 | RUN apt-get install -y apt-utils
8 | RUN apt-get install -y vim emacs make
9 | RUN apt-get install -y git libicu52 libedit2
10 |
11 | # rpi-swift is installing stuff into site-packages, need to move them away
12 | RUN mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift
13 | RUN apt-get install -y python2.7-minimal
14 | RUN mv /usr/lib/python2.7/site-packages.swift/* /usr/local/lib/python2.7/dist-packages/
15 | RUN rmdir /usr/lib/python2.7/site-packages.swift
16 |
17 | RUN apt-get install -y python
18 |
19 | RUN apt-get install -y clang-3.9 libc6-dev
20 |
21 | RUN apt-get install -y \
22 | libicu-dev \
23 | autoconf libtool pkg-config \
24 | libblocksruntime-dev \
25 | libkqueue-dev \
26 | libpthread-workqueue-dev \
27 | systemtap-sdt-dev \
28 | libbsd-dev libbsd0 libbsd0-dbg \
29 | curl libcurl4-openssl-dev \
30 | libedit-dev \
31 | libxml2 \
32 | wget
33 |
34 | RUN sudo update-alternatives --quiet --install /usr/bin/clang clang /usr/bin/clang-3.9 100
35 | RUN sudo update-alternatives --quiet --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.9 100
36 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-raspbian-swift-3.1.1-build.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run --rm --interactive --tty helje5/rpi-raspbian-swift-build311-env bash
4 | #
5 | # TODO: need a script within the image for this:
6 | # docker run --rm -v /home/pirate:/package helje5/rpi-raspbian-swift311-build \
7 | # tar zcf '/package/swift-3.1.1-$(uname -m)-$(lsb_release -i -s | tr A-Z a-z)-$(lsb_release -r -s).tar.gz' *
8 | #
9 | # 2017-04-25: @ffried says only those two should be necessary for 3.1.1:
10 | # https://github.com/swift-arm/swift-llvm/commit/95581a28b69cc7ea811055891b499576fdfc8ed7
11 | # https://github.com/apple/swift-corelibs-libdispatch/pull/233/commits/d53fe63ef8ab88018bec940d067ae965144e2dab
12 | #
13 |
14 | FROM helje5/rpi-raspbian-swift-build311-env
15 |
16 | # swiftsrc is in /swiftsrc
17 | WORKDIR /swiftsrc
18 |
19 | RUN bash -c "curl -L -o swift-llvm-fdfc8ed7.diff https://github.com/swift-arm/swift-llvm/commit/95581a28b69cc7ea811055891b499576fdfc8ed7.diff;\
20 | curl -L -o swift-corelibs-libdispatch-233.diff https://github.com/apple/swift-corelibs-libdispatch/pull/233.diff"
21 |
22 | RUN bash -c "cd swift-corelibs-libdispatch && \
23 | patch -l -p1 < ../swift-corelibs-libdispatch-233.diff; \
24 | cd ..; \
25 | cd llvm && \
26 | patch -l -p1 < ../swift-llvm-fdfc8ed7.diff"
27 |
28 |
29 | # this fails because the script patches the PYTHONPATH so that
30 | # swiftsrc/swift/utils is before swiftsrc/swift/utils/swift_build_support
31 | # (and hence picks up the duplicate swift_build_support directory)
32 | # sys.path.append(os.path.dirname(__file__)) ...
33 | RUN bash -c "mv swift/utils/build-script swift/utils/build-script.orig; \
34 | cat swift/utils/build-script.orig \
35 | | sed '/import sys/a sys.path.append(os.path.join(os.path.dirname(__file__), \"swift_build_support\"))' \
36 | | sed '/import sys/a sys.path = sys.path[1:]' \
37 | >> swift/utils/build-script; \
38 | chmod +x swift/utils/build-script"
39 |
40 |
41 | # Patch TableGen clang/llvm, those bus-error when built w/ optimization
42 | # (presumably a clang-3.9 on ARM issue)
43 | RUN bash -c "\
44 | cd /swiftsrc/llvm/utils/TableGen; \
45 | mv CMakeLists.txt CMakeLists.txt.orig; \
46 | echo 'set (CMAKE_CXX_FLAGS_RELEASE \"-O1\")' > CMakeLists.txt; \
47 | cat CMakeLists.txt.orig >> CMakeLists.txt; \
48 | cd /swiftsrc/clang/utils/TableGen; \
49 | mv CMakeLists.txt CMakeLists.txt.orig; \
50 | echo 'set (CMAKE_CXX_FLAGS_RELEASE \"-O1\")' > CMakeLists.txt; \
51 | cat CMakeLists.txt.orig >> CMakeLists.txt \
52 | "
53 |
54 |
55 | # embedded buildSwiftOnArm
56 |
57 | ENV REL=3.1.1 \
58 | INSTALL_DIR=/swiftsrc/install \
59 | PACKAGE=/swiftsrc/swift-3.1.1.tgz \
60 | BRANCH=swift-3.1.1-RELEASE \
61 | SWIFT_SOURCE_ROOT=/swiftsrc
62 |
63 | RUN ./swift/utils/build-script --build-subdir buildbot_linux -R \
64 | --lldb --llbuild --xctest --swiftpm --foundation --libdispatch \
65 | -- --install-libdispatch --install-foundation --install-swift \
66 | --install-lldb --install-llbuild --install-xctest --install-swiftpm \
67 | --install-prefix=/usr \
68 | '--swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;dev' \
69 | --build-swift-static-stdlib --build-swift-static-sdk-overlay \
70 | --install-destdir=$INSTALL_DIR --installable-package=$PACKAGE
71 |
72 | # echo "+ Fixing up the install package for ARM"
73 | RUN bash -c "\
74 | cp -R swift-corelibs-libdispatch/dispatch/ ${INSTALL_DIR}/usr/lib/swift; \
75 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/swift/Dispatch.swiftdoc \
76 | ${INSTALL_DIR}/usr/lib/swift/linux/armv7/; \
77 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/swift/Dispatch.swiftmodule \
78 | ${INSTALL_DIR}/usr/lib/swift/linux/armv7/; \
79 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/libdispatch.la \
80 | ${INSTALL_DIR}/usr/lib/swift/linux/; \
81 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/.libs/libdispatch.so \
82 | ${INSTALL_DIR}/usr/lib/swift/linux; \
83 | mkdir -p ${INSTALL_DIR}/usr/lib/swift/os; \
84 | cp swift-corelibs-libdispatch/os/linux_base.h ${INSTALL_DIR}/usr/lib/swift/os; \
85 | cp swift-corelibs-libdispatch/os/object.h ${INSTALL_DIR}/usr/lib/swift/os \
86 | "
87 |
88 | # Retar
89 | # echo "+ Retar installation package"
90 | RUN tar -C ${INSTALL_DIR} -czf ${PACKAGE} .
91 |
92 |
93 | # the results will be in
94 | # /swiftsrc/install/usr/[bin|include|lib|libexec|local|share]
95 |
96 | WORKDIR /swiftsrc/install/usr/
97 |
98 |
99 | # This is all wrong :-) Well, kinda. Building Swift in Docker is useful to
100 | # reuse build steps in a clean way and not clutter the host with patched
101 | # sources and such.
102 | # But it would probably be better (and faster) to just run a script instead
103 | # of building images.
104 | #
105 | # Hence the stuff below doesn't make sense. To pull out the built binary,
106 | # you need to run a container with the image built by this dockerfile.
107 |
108 | #VOLUME /package
109 |
110 | # takes ~4mins on RPi3, ~122MB (BZip2 takes ~8mins on RPi3, saves 12MB)
111 | #RUN tar zcf "/package/swift-3.1.1-$(uname -m)-$(lsb_release -i -s | tr A-Z a-z)-$(lsb_release -r -s).tar.gz" *
112 | # tar zcf "/package/swift-3.1.1-$(uname -m)-$(lsb_release -i -s | tr A-Z a-z)-$(lsb_release -r -s).tar.gz" *
113 |
114 | RUN bash
115 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-raspbian-swift-build-env.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # A Raspian environment for building Swift itself.
4 | #
5 | # Ubuntu 16.04 is based on Debian stretch/sid
6 | # resin/rpi-raspbian latest is jessie (current Debian 8 stable)
7 | #
8 | # resin/rpi-raspbian:jessie has no clang 3.8, but 3.7 and 3.9.
9 | #
10 | FROM resin/rpi-raspbian:jessie
11 |
12 | ENV DEBIAN_FRONTEND noninteractive
13 |
14 | ARG CLANG_VERSION=3.9
15 |
16 | RUN apt-get update
17 |
18 | # https://www.uraimo.com/2016/12/30/Swift-3-0-2-for-raspberrypi-zero-1-2-3/
19 | # python3 required for test
20 | RUN apt-get install -y \
21 | patch git \
22 | libedit2 \
23 | libpython2.7 curl libxml2 \
24 | python3 \
25 | \
26 | cmake ninja-build clang-$CLANG_VERSION python uuid-dev libicu-dev \
27 | icu-devtools libbsd-dev libedit-dev libxml2-dev libsqlite3-dev \
28 | swig libpython-dev libncurses5-dev pkg-config libblocksruntime-dev \
29 | libcurl4-openssl-dev autoconf libtool systemtap-sdt-dev libkqueue-dev \
30 | automake make m4 \
31 | \
32 | lsb-release
33 |
34 | RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-$CLANG_VERSION 100
35 | RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$CLANG_VERSION 100
36 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-swift-3.1.0-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run --privileged=true -i --tty --rm helje5/rpi-swift-dev:3.1.0
4 | #
5 | FROM helje5/rpi-swift:3.1.0
6 |
7 | # rpi-swift sets it to swift
8 | USER root
9 |
10 | ENV DEBIAN_FRONTEND noninteractive
11 |
12 | ARG CLANG_VERSION=3.8
13 |
14 | RUN apt-get install -y apt-utils
15 | RUN apt-get install -y vim emacs make
16 | RUN apt-get install -y git libicu55 libedit2
17 |
18 | # rpi-swift is installing stuff into site-packages, need to move them away
19 | RUN mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift
20 | RUN apt-get install -y python2.7-minimal
21 | RUN mv /usr/lib/python2.7/site-packages.swift/* /usr/local/lib/python2.7/dist-packages/
22 | RUN rmdir /usr/lib/python2.7/site-packages.swift
23 |
24 | RUN apt-get install -y python
25 |
26 | RUN apt-get install -y clang-$CLANG_VERSION libc6-dev
27 |
28 | RUN apt-get install -y \
29 | libicu-dev \
30 | autoconf libtool pkg-config \
31 | libblocksruntime-dev \
32 | libkqueue-dev \
33 | libpthread-workqueue-dev \
34 | systemtap-sdt-dev \
35 | libbsd-dev libbsd0 \
36 | curl libcurl4-openssl-dev \
37 | libedit-dev \
38 | libxml2 \
39 | wget sudo
40 |
41 | RUN update-alternatives --quiet --install /usr/bin/clang clang /usr/bin/clang-$CLANG_VERSION 100
42 | RUN update-alternatives --quiet --install /usr/bin/clang++ clang++ /usr/bin/clang++-$CLANG_VERSION 100
43 |
44 |
45 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
46 |
47 | RUN adduser swift sudo
48 | RUN echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift
49 | RUN chmod 0440 /etc/sudoers.d/swift
50 | RUN echo 'swift:swift' | chpasswd
51 |
52 |
53 | USER swift
54 | WORKDIR /home/swift
55 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-swift-3.1.1-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run -i --tty --name "swift-dev" --rm helje5/rpi-swift-dev:3.1.1
4 | #
5 | FROM helje5/rpi-swift:3.1.1
6 |
7 | LABEL maintainer "Helge Heß "
8 |
9 | # rpi-swift sets it to swift
10 | USER root
11 |
12 | ENV DEBIAN_FRONTEND noninteractive
13 |
14 | ARG CLANG_VERSION=3.8
15 |
16 | RUN apt-get install -y apt-utils \
17 | vim emacs make \
18 | git libicu55 libedit2
19 |
20 | # rpi-swift is installing stuff into site-packages, need to move them away
21 | RUN bash -c "\
22 | mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift; \
23 | apt-get install -y python2.7-minimal; \
24 | mv /usr/lib/python2.7/site-packages.swift/* \
25 | /usr/local/lib/python2.7/dist-packages/; \
26 | rmdir /usr/lib/python2.7/site-packages.swift \
27 | "
28 |
29 | RUN apt-get install -y \
30 | python \
31 | \
32 | clang-$CLANG_VERSION libc6-dev libxml2-dev bison lsb-release gdb \
33 | \
34 | libicu-dev \
35 | autoconf libtool pkg-config \
36 | libblocksruntime-dev \
37 | libkqueue-dev \
38 | libpthread-workqueue-dev \
39 | systemtap-sdt-dev \
40 | libbsd-dev libbsd0 \
41 | curl libcurl4-openssl-dev \
42 | libedit-dev \
43 | libxml2 \
44 | wget sudo gosu
45 |
46 | RUN bash -c "update-alternatives --quiet --install /usr/bin/clang \
47 | clang /usr/bin/clang-$CLANG_VERSION 100;\
48 | update-alternatives --quiet --install /usr/bin/clang++ \
49 | clang++ /usr/bin/clang++-$CLANG_VERSION 100"
50 |
51 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
52 |
53 | RUN bash -c "\
54 | adduser swift sudo; \
55 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
56 | chmod 0440 /etc/sudoers.d/swift; \
57 | echo 'swift:swift' | chpasswd \
58 | "
59 |
60 | USER swift
61 | WORKDIR /home/swift
62 |
63 | RUN bash -c "\
64 | mkdir -p /home/swift/.emacs.d/lisp; \
65 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
66 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
67 | echo \"(require 'swift-mode)\" >> .emacs \
68 | "
69 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-swift-4.1.0-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run -i --tty --name "swift-dev" --rm helje5/rpi-swift-dev:4.1.0
4 | #
5 | FROM helje5/rpi-swift:4.1.0
6 |
7 | LABEL maintainer "Helge Heß "
8 |
9 | # rpi-swift sets it to swift
10 | USER root
11 |
12 | ENV DEBIAN_FRONTEND noninteractive
13 |
14 | ARG CLANG_VERSION=3.8
15 |
16 | RUN apt-get install -y apt-utils \
17 | vim emacs make \
18 | git libicu55 libedit2
19 |
20 | # rpi-swift is installing stuff into site-packages, need to move them away
21 | RUN bash -c "\
22 | mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift; \
23 | apt-get install -y python2.7-minimal; \
24 | mv /usr/lib/python2.7/site-packages.swift/* \
25 | /usr/local/lib/python2.7/dist-packages/; \
26 | rmdir /usr/lib/python2.7/site-packages.swift \
27 | "
28 |
29 | RUN apt-get install -y \
30 | python \
31 | \
32 | clang-$CLANG_VERSION libxml2-dev bison lsb-release gdb \
33 | \
34 | libicu-dev \
35 | autoconf libtool pkg-config \
36 | libblocksruntime-dev \
37 | libkqueue-dev \
38 | libpthread-workqueue-dev \
39 | systemtap-sdt-dev \
40 | libbsd-dev libbsd0 \
41 | curl libcurl4-openssl-dev \
42 | libedit-dev \
43 | libxml2 \
44 | wget sudo gosu \
45 | zlib1g-dev \
46 | libsqlite3-dev \
47 | telnet netcat \
48 | inetutils-ping dialog \
49 | nfs-common
50 |
51 | RUN bash -c "update-alternatives --quiet --install /usr/bin/clang \
52 | clang /usr/bin/clang-$CLANG_VERSION 100;\
53 | update-alternatives --quiet --install /usr/bin/clang++ \
54 | clang++ /usr/bin/clang++-$CLANG_VERSION 100"
55 |
56 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
57 |
58 | RUN bash -c "\
59 | adduser swift sudo; \
60 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
61 | chmod 0440 /etc/sudoers.d/swift; \
62 | echo 'swift:swift' | chpasswd \
63 | "
64 |
65 | USER swift
66 | WORKDIR /home/swift
67 |
68 | RUN bash -c "\
69 | mkdir -p /home/swift/.emacs.d/lisp; \
70 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
71 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
72 | echo \"(require 'swift-mode)\"; >> .emacs \
73 | echo \"(setq-default indent-tabs-mode nil)\" >> .emacs \
74 | "
75 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-swift-4.1.2-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run -i --tty --name "swift-dev" --rm helje5/rpi-swift-dev:4.1.2
4 | #
5 | FROM helje5/rpi-swift:4.1.2
6 |
7 | LABEL maintainer "Helge Heß "
8 |
9 | # rpi-swift sets it to swift
10 | USER root
11 |
12 | ENV DEBIAN_FRONTEND noninteractive
13 |
14 | ARG CLANG_VERSION=3.8
15 |
16 | RUN apt-get install -y apt-utils \
17 | vim emacs make \
18 | git libicu55 libedit2
19 |
20 | # rpi-swift is installing stuff into site-packages, need to move them away
21 | RUN bash -c "\
22 | mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift; \
23 | apt-get install -y python2.7-minimal; \
24 | mv /usr/lib/python2.7/site-packages.swift/* \
25 | /usr/local/lib/python2.7/dist-packages/; \
26 | rmdir /usr/lib/python2.7/site-packages.swift \
27 | "
28 |
29 | RUN apt-get install -y \
30 | python \
31 | \
32 | clang-$CLANG_VERSION libxml2-dev bison lsb-release gdb \
33 | \
34 | libicu-dev \
35 | autoconf libtool pkg-config \
36 | libblocksruntime-dev \
37 | libkqueue-dev \
38 | libpthread-workqueue-dev \
39 | systemtap-sdt-dev \
40 | libbsd-dev libbsd0 \
41 | curl libcurl4-openssl-dev \
42 | libedit-dev \
43 | libxml2 \
44 | wget sudo gosu \
45 | zlib1g-dev \
46 | libsqlite3-dev \
47 | telnet netcat \
48 | inetutils-ping dialog \
49 | nfs-common
50 |
51 | RUN bash -c "update-alternatives --quiet --install /usr/bin/clang \
52 | clang /usr/bin/clang-$CLANG_VERSION 100;\
53 | update-alternatives --quiet --install /usr/bin/clang++ \
54 | clang++ /usr/bin/clang++-$CLANG_VERSION 100"
55 |
56 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
57 |
58 | RUN bash -c "\
59 | adduser swift sudo; \
60 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
61 | chmod 0440 /etc/sudoers.d/swift; \
62 | echo 'swift:swift' | chpasswd \
63 | "
64 |
65 | USER swift
66 | WORKDIR /home/swift
67 |
68 | RUN bash -c "\
69 | mkdir -p /home/swift/.emacs.d/lisp; \
70 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
71 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
72 | echo \"(require 'swift-mode)\" >> .emacs; \
73 | echo \"(setq-default indent-tabs-mode nil)\" >> .emacs \
74 | "
75 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-swift-4.1.alpha1-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run -i --tty --name "swift-dev" --rm helje5/rpi-swift-dev:4.1.alpha1
4 | #
5 | FROM helje5/rpi-swift:4.1.alpha1
6 |
7 | LABEL maintainer "Helge Heß "
8 |
9 | # rpi-swift sets it to swift
10 | USER root
11 |
12 | ENV DEBIAN_FRONTEND noninteractive
13 |
14 | ARG CLANG_VERSION=3.8
15 |
16 | RUN apt-get install -y apt-utils \
17 | vim emacs make \
18 | git libicu55 libedit2
19 |
20 | # rpi-swift is installing stuff into site-packages, need to move them away
21 | RUN bash -c "\
22 | mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages.swift; \
23 | apt-get install -y python2.7-minimal; \
24 | mv /usr/lib/python2.7/site-packages.swift/* \
25 | /usr/local/lib/python2.7/dist-packages/; \
26 | rmdir /usr/lib/python2.7/site-packages.swift \
27 | "
28 |
29 | RUN apt-get install -y \
30 | python \
31 | \
32 | clang-$CLANG_VERSION libc6-dev libxml2-dev bison lsb-release gdb \
33 | \
34 | libicu-dev \
35 | autoconf libtool pkg-config \
36 | libblocksruntime-dev \
37 | libkqueue-dev \
38 | libpthread-workqueue-dev \
39 | systemtap-sdt-dev \
40 | libbsd-dev libbsd0 \
41 | curl libcurl4-openssl-dev \
42 | libedit-dev \
43 | libxml2 \
44 | wget sudo gosu
45 |
46 | RUN bash -c "update-alternatives --quiet --install /usr/bin/clang \
47 | clang /usr/bin/clang-$CLANG_VERSION 100;\
48 | update-alternatives --quiet --install /usr/bin/clang++ \
49 | clang++ /usr/bin/clang++-$CLANG_VERSION 100"
50 |
51 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
52 |
53 | RUN bash -c "\
54 | adduser swift sudo; \
55 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
56 | chmod 0440 /etc/sudoers.d/swift; \
57 | echo 'swift:swift' | chpasswd \
58 | "
59 |
60 | USER swift
61 | WORKDIR /home/swift
62 |
63 | RUN bash -c "\
64 | mkdir -p /home/swift/.emacs.d/lisp; \
65 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
66 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
67 | echo \"(require 'swift-mode)\" >> .emacs \
68 | "
69 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-ubuntu-swift-3.1.0-build-all.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # https://github.com/uraimo/buildSwiftOnARM.git
4 | #
5 | # TBD: I guess this shouldn't actually be a container but rather a
6 | # script which runs withing a plain ioft/armhf-ubuntu?!
7 | # (or maybe a /ubuntu-buildenv to save the APT setup)
8 |
9 | FROM ioft/armhf-ubuntu:16.04
10 |
11 | VOLUME /package
12 | ARG SWIFT_VERSION=3.1
13 | ENV SWIFT_RELEASE_TAG=swift-$SWIFT_VERSION-RELEASE
14 |
15 | ENV DEBIAN_FRONTEND noninteractive
16 |
17 | RUN apt-get update
18 |
19 | # https://www.uraimo.com/2016/12/30/Swift-3-0-2-for-raspberrypi-zero-1-2-3/
20 | # python3 required for test
21 | RUN apt-get install -y \
22 | patch git \
23 | libedit2 \
24 | libpython2.7 curl libxml2 \
25 | python3 \
26 | \
27 | cmake ninja-build clang-3.8 python uuid-dev libicu-dev \
28 | icu-devtools libbsd-dev libedit-dev libxml2-dev libsqlite3-dev \
29 | swig libpython-dev libncurses5-dev pkg-config libblocksruntime-dev \
30 | libcurl4-openssl-dev autoconf libtool systemtap-sdt-dev libkqueue-dev \
31 | automake make m4 \
32 | \
33 | lsb-release
34 |
35 | RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100
36 | RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100
37 |
38 |
39 | # Checkout Swift sources
40 |
41 | RUN mkdir /swiftsrc
42 | WORKDIR /swiftsrc
43 |
44 | RUN git clone https://github.com/apple/swift
45 | RUN ./swift/utils/update-checkout --clone
46 |
47 | # https://github.com/uraimo/buildSwiftOnARM/blob/master/checkoutRelease.sh
48 | RUN find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "echo Cleaning '{}';cd '{}'; git reset --hard HEAD" \;
49 | RUN find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "echo Updating '{}';cd '{}'; git pull; git fetch --tags" \;
50 | RUN find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "echo Switching '{}' to ${SWIFT_RELEASE_TAG};cd '{}'; git checkout ${SWIFT_RELEASE_TAG}" \;
51 |
52 |
53 | # Apply Patches from buildSwiftOnARM
54 |
55 | RUN bash -c 'git clone https://github.com/uraimo/buildSwiftOnARM.git; \
56 | cd buildSwiftOnARM; \
57 | git archive -9 --format tgz master -o ../buildSwiftOnARM-$SWIFT_VERSION.tgz; \
58 | cd ..; \
59 | rm -rf buildSwiftOnARM; \
60 | cd /swiftsrc; \
61 | tar zxf ../buildSwiftOnARM-$SWIFT_VERSION.tgz; \
62 | rm ../buildSwiftOnARM-$SWIFT_VERSION.tgz'
63 |
64 | WORKDIR /swiftsrc
65 |
66 | RUN bash -c "for DIR in *; do \
67 | if test -d \"\${DIR}\"; then \
68 | if test -d \"\${DIR}.diffs\"; then \
69 | echo \"Applying patches to \${DIR}\" ; \
70 | cd \"\${DIR}\"; \
71 | patch -l -p1 < ../\${DIR}.diffs/*.diff; \
72 | cd ..; \
73 | fi; \
74 | fi; \
75 | done"
76 |
77 |
78 | # Patch build.sh and run it
79 |
80 | ENV SWIFT_SOURCE_ROOT /swiftsrc
81 |
82 | # this fails because the script patches the PYTHONPATH so that
83 | # swiftsrc/swift/utils is before swiftsrc/swift/utils/swift_build_support
84 | # (and hence picks up the duplicate swift_build_support directory)
85 | # sys.path.append(os.path.dirname(__file__)) ...
86 | RUN bash -c "mv swift/utils/build-script swift/utils/build-script.orig; \
87 | cat swift/utils/build-script.orig \
88 | | sed '/import sys/a sys.path.append(os.path.join(os.path.dirname(__file__), \"swift_build_support\"))' \
89 | | sed '/import sys/a sys.path = sys.path[1:]' \
90 | >> swift/utils/build-script; \
91 | chmod +x swift/utils/build-script"
92 |
93 | RUN ./build.sh
94 |
95 | # the results will be in
96 | # /swiftsrc/install/usr/[bin|include|lib|libexec|local|share]
97 |
98 |
99 | WORKDIR /swiftsrc/install/usr/
100 |
101 | # takes ~4mins on RPi3, ~122MB (BZip2 takes ~8mins on RPi3, saves 12MB)
102 | RUN tar zcf "/package/swift-$SWIFT_VERSION-$(uname -m)-$(lsb_release -i -s | tr A-Z a-z)-$(lsb_release -r -s).tar.gz" *
103 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-ubuntu-swift-3.1.0-build.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # https://github.com/uraimo/buildSwiftOnARM.git
4 | #
5 | # docker run --rm --interactive --tty helje5/rpi-swift-build
6 |
7 | FROM helje5/rpi-ubuntu-swift-build31-env
8 |
9 | ENV DEBIAN_FRONTEND noninteractive
10 |
11 | # swiftsrc is in /swiftsrc
12 |
13 | RUN bash -c 'git clone https://github.com/uraimo/buildSwiftOnARM.git; \
14 | cd buildSwiftOnARM; \
15 | git archive -9 --format tgz master -o ../buildSwiftOnARM-3.1.tgz; \
16 | cd ..; \
17 | rm -rf buildSwiftOnARM; \
18 | cd /swiftsrc; \
19 | tar zxf ../buildSwiftOnARM-3.1.tgz; \
20 | rm ../buildSwiftOnARM-3.1.tgz'
21 |
22 | WORKDIR /swiftsrc
23 |
24 | RUN bash -c "for DIR in *; do \
25 | if test -d \"\${DIR}\"; then \
26 | if test -d \"\${DIR}.diffs\"; then \
27 | echo \"Applying patches to \${DIR}\" ; \
28 | cd \"\${DIR}\"; \
29 | patch -l -p1 < ../\${DIR}.diffs/*.diff; \
30 | cd ..; \
31 | fi; \
32 | fi; \
33 | done"
34 |
35 | ENV SWIFT_SOURCE_ROOT /swiftsrc
36 |
37 | # this fails because the script patches the PYTHONPATH so that
38 | # swiftsrc/swift/utils is before swiftsrc/swift/utils/swift_build_support
39 | # (and hence picks up the duplicate swift_build_support directory)
40 | # sys.path.append(os.path.dirname(__file__)) ...
41 | RUN bash -c "mv swift/utils/build-script swift/utils/build-script.orig; \
42 | cat swift/utils/build-script.orig \
43 | | sed '/import sys/a sys.path.append(os.path.join(os.path.dirname(__file__), \"swift_build_support\"))' \
44 | | sed '/import sys/a sys.path = sys.path[1:]' \
45 | >> swift/utils/build-script; \
46 | chmod +x swift/utils/build-script"
47 |
48 | RUN ./build.sh
49 |
50 | # the results will be in
51 | # /swiftsrc/install/usr/[bin|include|lib|libexec|local|share]
52 |
53 | WORKDIR /swiftsrc/install/usr/
54 |
55 | RUN apt-get install -y lsb-release
56 |
57 | VOLUME /package
58 |
59 | # takes ~4mins on RPi3, ~122MB (BZip2 takes ~8mins on RPi3, saves 12MB)
60 | RUN tar zcf "/package/swift-3.1-$(uname -m)-$(lsb_release -i -s | tr A-Z a-z)-$(lsb_release -r -s).tar.gz" *
61 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-ubuntu-swift-3.1.1-build.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run --rm -i --tty helje5/rpi-ubuntu-swift-build311-env bash
4 | #
5 | # TODO: need a script within the image for this:
6 | # docker run --rm -v /home/pirate:/package helje5/rpi-ubuntu-swift311-build \
7 | # tar zcf '/package/swift-3.1.1-$(uname -m)-$(lsb_release -i -s | tr A-Z a-z)-$(lsb_release -r -s).tar.gz' *
8 | #
9 | # 2017-04-25: @ffried says only those two should be necessary for 3.1.1:
10 | # https://github.com/swift-arm/swift-llvm/commit/95581a28b69cc7ea811055891b499576fdfc8ed7
11 | # https://github.com/apple/swift-corelibs-libdispatch/pull/233/commits/d53fe63ef8ab88018bec940d067ae965144e2dab
12 | #
13 |
14 | FROM helje5/rpi-ubuntu-swift-build311-env
15 |
16 | # swiftsrc is in /swiftsrc
17 | WORKDIR /swiftsrc
18 |
19 | RUN bash -c "curl -L -o swift-llvm-fdfc8ed7.diff https://github.com/swift-arm/swift-llvm/commit/95581a28b69cc7ea811055891b499576fdfc8ed7.diff;\
20 | curl -L -o swift-corelibs-libdispatch-233.diff https://github.com/apple/swift-corelibs-libdispatch/pull/233.diff"
21 |
22 | RUN bash -c "cd swift-corelibs-libdispatch && \
23 | patch -l -p1 < ../swift-corelibs-libdispatch-233.diff; \
24 | cd ..; \
25 | cd llvm && \
26 | patch -l -p1 < ../swift-llvm-fdfc8ed7.diff"
27 |
28 |
29 | # this fails because the script patches the PYTHONPATH so that
30 | # swiftsrc/swift/utils is before swiftsrc/swift/utils/swift_build_support
31 | # (and hence picks up the duplicate swift_build_support directory)
32 | # sys.path.append(os.path.dirname(__file__)) ...
33 | RUN bash -c "mv swift/utils/build-script swift/utils/build-script.orig; \
34 | cat swift/utils/build-script.orig \
35 | | sed '/import sys/a sys.path.append(os.path.join(os.path.dirname(__file__), \"swift_build_support\"))' \
36 | | sed '/import sys/a sys.path = sys.path[1:]' \
37 | >> swift/utils/build-script; \
38 | chmod +x swift/utils/build-script"
39 |
40 | # embedded buildSwiftOnArm
41 |
42 | ENV REL=3.1.1 \
43 | INSTALL_DIR=/swiftsrc/install \
44 | PACKAGE=/swiftsrc/swift-3.1.1.tgz \
45 | BRANCH=swift-3.1.1-RELEASE \
46 | SWIFT_SOURCE_ROOT=/swiftsrc
47 |
48 | RUN ./swift/utils/build-script --build-subdir buildbot_linux -R \
49 | --lldb --llbuild --xctest --swiftpm --foundation --libdispatch \
50 | -- --install-libdispatch --install-foundation --install-swift \
51 | --install-lldb --install-llbuild --install-xctest --install-swiftpm \
52 | --install-prefix=/usr \
53 | '--swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;dev' \
54 | --build-swift-static-stdlib --build-swift-static-sdk-overlay \
55 | --install-destdir=$INSTALL_DIR --installable-package=$PACKAGE
56 |
57 | # echo "+ Fixing up the install package for ARM"
58 | RUN bash -c "\
59 | cp -R swift-corelibs-libdispatch/dispatch/ ${INSTALL_DIR}/usr/lib/swift; \
60 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/swift/Dispatch.swiftdoc \
61 | ${INSTALL_DIR}/usr/lib/swift/linux/armv7/; \
62 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/swift/Dispatch.swiftmodule \
63 | ${INSTALL_DIR}/usr/lib/swift/linux/armv7/; \
64 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/libdispatch.la \
65 | ${INSTALL_DIR}/usr/lib/swift/linux/; \
66 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/.libs/libdispatch.so \
67 | ${INSTALL_DIR}/usr/lib/swift/linux; \
68 | mkdir -p ${INSTALL_DIR}/usr/lib/swift/os; \
69 | cp swift-corelibs-libdispatch/os/linux_base.h ${INSTALL_DIR}/usr/lib/swift/os; \
70 | cp swift-corelibs-libdispatch/os/object.h ${INSTALL_DIR}/usr/lib/swift/os \
71 | "
72 |
73 | # Retar
74 | # echo "+ Retar installation package"
75 | RUN tar -C ${INSTALL_DIR} -czf ${PACKAGE} .
76 |
77 |
78 | # the results will be in
79 | # /swiftsrc/install/usr/[bin|include|lib|libexec|local|share]
80 |
81 | WORKDIR /swiftsrc/install/usr/
82 |
83 |
84 | # This is all wrong :-) Well, kinda. Building Swift in Docker is useful to
85 | # reuse build steps in a clean way and not clutter the host with patched
86 | # sources and such.
87 | # But it would probably be better (and faster) to just run a script instead
88 | # of building images.
89 | #
90 | # Hence the stuff below doesn't make sense. To pull out the built binary,
91 | # you need to run a container with the image built by this dockerfile.
92 |
93 | #VOLUME /package
94 |
95 | # takes ~4mins on RPi3, ~122MB (BZip2 takes ~8mins on RPi3, saves 12MB)
96 | #RUN tar zcf "/package/swift-3.1.1-$(uname -m)-$(lsb_release -i -s | tr A-Z a-z)-$(lsb_release -r -s).tar.gz" *
97 | # tar zcf "/package/swift-3.1.1-$(uname -m)-$(lsb_release -i -s | tr A-Z a-z)-$(lsb_release -r -s).tar.gz" *
98 |
99 | RUN bash
100 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-ubuntu-swift-4.0.x-build.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run --rm -i --tty helje5/rpi-ubuntu-swift-build40x-env bash
4 | #
5 | # TODO: need a script within the image for this:
6 | # docker run --rm -v /home/pirate:/package helje5/rpi-ubuntu-swift311-build \
7 | # tar zcf '/package/swift-3.1.1-$(uname -m)-$(lsb_release -i -s | tr A-Z a-z)-$(lsb_release -r -s).tar.gz' *
8 | #
9 | # 2017-07-02: @ffried says only this should be necessary for 4.0.x (sans SPM):
10 | # https://github.com/ffried/swift-llvm/commit/dc71a13f4fab79f37ed7415397abac79a0eec131
11 | #
12 |
13 | FROM helje5/rpi-ubuntu-swift-build40x-env
14 |
15 | # swiftsrc is in /swiftsrc
16 | WORKDIR /swiftsrc
17 |
18 | RUN bash -c "curl -L -o swift-llvm-dc71a13f.diff https://github.com/ffried/swift-llvm/commit/dc71a13f4fab79f37ed7415397abac79a0eec131.patch"
19 |
20 | RUN bash -c "cd llvm && \
21 | patch -l -p1 < ../swift-llvm-dc71a13f.diff"
22 |
23 |
24 | # embedded buildSwiftOnArm
25 |
26 | ENV REL=4.0.0 \
27 | INSTALL_DIR=/swiftsrc/install \
28 | PACKAGE=/swiftsrc/swift-4.0.0.tgz \
29 | BRANCH=swift-4.0-branch \
30 | SWIFT_SOURCE_ROOT=/swiftsrc
31 |
32 | RUN ./swift/utils/build-script --build-subdir buildbot_linux -R \
33 | --lldb --llbuild --xctest --swiftpm --foundation --libdispatch \
34 | -- --install-libdispatch --install-foundation --install-swift \
35 | --install-lldb --install-llbuild --install-xctest --install-swiftpm \
36 | --install-prefix=/usr \
37 | '--swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;dev' \
38 | --build-swift-static-stdlib --build-swift-static-sdk-overlay \
39 | --install-destdir=$INSTALL_DIR --installable-package=$PACKAGE
40 |
41 | # echo "+ Fixing up the install package for ARM"
42 | RUN bash -c "\
43 | cp -R swift-corelibs-libdispatch/dispatch/ ${INSTALL_DIR}/usr/lib/swift; \
44 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/swift/Dispatch.swiftdoc \
45 | ${INSTALL_DIR}/usr/lib/swift/linux/armv7/; \
46 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/swift/Dispatch.swiftmodule \
47 | ${INSTALL_DIR}/usr/lib/swift/linux/armv7/; \
48 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/libdispatch.la \
49 | ${INSTALL_DIR}/usr/lib/swift/linux/; \
50 | cp ./build/buildbot_linux/libdispatch-linux-armv7/src/.libs/libdispatch.so \
51 | ${INSTALL_DIR}/usr/lib/swift/linux; \
52 | mkdir -p ${INSTALL_DIR}/usr/lib/swift/os; \
53 | cp swift-corelibs-libdispatch/os/linux_base.h ${INSTALL_DIR}/usr/lib/swift/os; \
54 | cp swift-corelibs-libdispatch/os/object.h ${INSTALL_DIR}/usr/lib/swift/os \
55 | "
56 |
57 | # Retar
58 | # echo "+ Retar installation package"
59 | RUN tar -C ${INSTALL_DIR} -czf ${PACKAGE} .
60 |
61 |
62 | # the results will be in
63 | # /swiftsrc/install/usr/[bin|include|lib|libexec|local|share]
64 |
65 | WORKDIR /swiftsrc/install/usr/
66 |
67 |
68 | # This is all wrong :-) Well, kinda. Building Swift in Docker is useful to
69 | # reuse build steps in a clean way and not clutter the host with patched
70 | # sources and such.
71 | # But it would probably be better (and faster) to just run a script instead
72 | # of building images.
73 | #
74 | # Hence the stuff below doesn't make sense. To pull out the built binary,
75 | # you need to run a container with the image built by this dockerfile.
76 |
77 | #VOLUME /package
78 |
79 | # takes ~4mins on RPi3, ~122MB (BZip2 takes ~8mins on RPi3, saves 12MB)
80 | #RUN tar zcf "/package/swift-3.1.1-$(uname -m)-$(lsb_release -i -s | tr A-Z a-z)-$(lsb_release -r -s).tar.gz" *
81 | # tar zcf "/package/swift-3.1.1-$(uname -m)-$(lsb_release -i -s | tr A-Z a-z)-$(lsb_release -r -s).tar.gz" *
82 |
83 | RUN bash
84 |
--------------------------------------------------------------------------------
/empty-ctx/rpi-ubuntu-swift-build-env.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # An RPI Ubuntu environment for building Swift itself.
4 | #
5 | FROM ioft/armhf-ubuntu:16.04
6 |
7 | ENV DEBIAN_FRONTEND noninteractive
8 |
9 | RUN apt-get update
10 |
11 | # https://www.uraimo.com/2016/12/30/Swift-3-0-2-for-raspberrypi-zero-1-2-3/
12 | # python3 required for test
13 | RUN apt-get install -y \
14 | patch git \
15 | libedit2 \
16 | libpython2.7 curl libxml2 \
17 | python3 \
18 | \
19 | cmake ninja-build clang-3.8 python uuid-dev libicu-dev \
20 | icu-devtools libbsd-dev libedit-dev libxml2-dev libsqlite3-dev \
21 | swig libpython-dev libncurses5-dev pkg-config libblocksruntime-dev \
22 | libcurl4-openssl-dev autoconf libtool systemtap-sdt-dev libkqueue-dev \
23 | automake make m4 \
24 | \
25 | lsb-release
26 |
27 | RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100
28 | RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100
29 |
--------------------------------------------------------------------------------
/empty-ctx/swift-3.1.0-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run --i --tty --rm helje5/swift-dev:3.1.0
4 | #
5 | # This is an x86_64 image for Swift w/ Emacs and such installed.
6 | #
7 | # To build:
8 | #
9 | # docker build -t helje5/swift-dev:latest -t helje5/swift-dev:3.1.0 \
10 | # -f empty-ctx/swift-3.1.0-dev.dockerfile \
11 | # empty-ctx
12 | #
13 | FROM swift:3.1.0
14 |
15 | LABEL maintainer "Helge Heß "
16 |
17 | USER root
18 |
19 | ARG CLANG_VERSION=3.8
20 |
21 | # b0rked in the official image
22 | RUN chmod -R o+r /usr/lib/swift/CoreFoundation
23 |
24 | # ldconfig not setup in official image
25 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
26 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
27 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
28 | ldconfig"
29 |
30 | ENV DEBIAN_FRONTEND noninteractive
31 |
32 | RUN apt-get update && apt-get install -y \
33 | apt-utils vim emacs make git libicu55 libedit2 \
34 | libicu-dev \
35 | autoconf libtool pkg-config \
36 | curl libcurl4-openssl-dev \
37 | libedit-dev \
38 | libxml2 \
39 | wget sudo gosu \
40 | clang-$CLANG_VERSION libc6-dev libxml2-dev bison lsb-release gdb
41 |
42 | RUN bash -c "update-alternatives --quiet --install /usr/bin/clang \
43 | clang /usr/bin/clang-$CLANG_VERSION 100;\
44 | update-alternatives --quiet --install /usr/bin/clang++ \
45 | clang++ /usr/bin/clang++-$CLANG_VERSION 100"
46 |
47 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
48 |
49 | RUN bash -c "\
50 | useradd --groups sudo -ms /bin/bash swift; \
51 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
52 | chmod 0440 /etc/sudoers.d/swift; \
53 | echo 'swift:swift' | chpasswd \
54 | "
55 |
56 | USER swift
57 | WORKDIR /home/swift
58 |
59 | RUN bash -c "\
60 | mkdir -p /home/swift/.emacs.d/lisp; \
61 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
62 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
63 | echo \"(require 'swift-mode)\" >> .emacs \
64 | "
65 |
--------------------------------------------------------------------------------
/empty-ctx/swift-4.0.3-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run -i --tty --rm helje5/swift-dev:4.0.3
4 | #
5 | # This is an x86_64 image for Swift w/ Emacs and such installed.
6 | #
7 | # To build:
8 | #
9 | # docker build -t helje5/swift-dev:latest -t helje5/swift-dev:4.0.3 \
10 | # -f empty-ctx/swift-4-dev.dockerfile \
11 | # empty-ctx
12 | # docker push helje5/swift-dev:4.0.3
13 | # docker push helje5/swift-dev:latest
14 | #
15 | # Old, build Swift Docker from source:
16 | #
17 | # git clone https://github.com/swiftdocker/docker-swift.git
18 | # cd docker-swift/4.0
19 | # docker build -t helje5/swift4-test:latest \
20 | # -t helje5/swift4-test:4.0.3 -f Dockerfile .
21 | #
22 | # FROM helje5/swift4-test:latest
23 | #
24 | FROM swift:4.0.3
25 |
26 | LABEL maintainer "Helge Heß "
27 |
28 | USER root
29 |
30 | ARG CLANG_VERSION=3.8
31 |
32 | # b0rked in the official image
33 | RUN chmod -R o+r /usr/lib/swift/CoreFoundation
34 |
35 | # ldconfig not setup in official image
36 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
37 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
38 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
39 | ldconfig"
40 |
41 | ENV DEBIAN_FRONTEND noninteractive
42 |
43 | RUN apt-get update && apt-get install -y \
44 | apt-utils vim emacs make git libicu55 libedit2 \
45 | libicu-dev \
46 | autoconf libtool pkg-config \
47 | curl libcurl4-openssl-dev \
48 | libedit-dev \
49 | libxml2 \
50 | wget sudo gosu \
51 | clang-$CLANG_VERSION libc6-dev libxml2-dev bison lsb-release gdb \
52 | libsqlite3-dev \
53 | telnet netcat
54 |
55 | RUN bash -c "update-alternatives --quiet --install /usr/bin/clang \
56 | clang /usr/bin/clang-$CLANG_VERSION 100;\
57 | update-alternatives --quiet --install /usr/bin/clang++ \
58 | clang++ /usr/bin/clang++-$CLANG_VERSION 100"
59 |
60 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
61 |
62 | RUN bash -c "\
63 | useradd --groups sudo -ms /bin/bash swift; \
64 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
65 | chmod 0440 /etc/sudoers.d/swift; \
66 | echo 'swift:swift' | chpasswd \
67 | "
68 |
69 | USER swift
70 | WORKDIR /home/swift
71 |
72 | RUN bash -c "\
73 | mkdir -p /home/swift/.emacs.d/lisp; \
74 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
75 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
76 | echo \"(require 'swift-mode)\" >> .emacs \
77 | "
78 |
--------------------------------------------------------------------------------
/empty-ctx/swift-4.1-dev.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run -i --tty --rm helje5/swift-dev:4.1
4 | #
5 | # This is an x86_64 image for Swift w/ Emacs and such installed.
6 | #
7 | # To build:
8 | #
9 | # docker build -t helje5/swift-dev:latest -t helje5/swift-dev:4.1 \
10 | # -f empty-ctx/swift-4.1-dev.dockerfile \
11 | # empty-ctx
12 | # docker push helje5/swift-dev:4.1
13 | # docker push helje5/swift-dev:latest
14 | #
15 | # Old, build Swift Docker from source:
16 | #
17 | # git clone https://github.com/swiftdocker/docker-swift.git
18 | # cd docker-swift/4.0
19 | # docker build -t helje5/swift4-test:latest \
20 | # -t helje5/swift4-test:4.1 -f Dockerfile .
21 | #
22 | # FROM helje5/swift4-test:latest
23 | #
24 | FROM swift:4.1
25 |
26 | LABEL maintainer "Helge Heß "
27 |
28 | USER root
29 |
30 | ARG CLANG_VERSION=3.8
31 |
32 | # b0rked in the official image
33 | RUN chmod -R o+r /usr/lib/swift/CoreFoundation
34 |
35 | # ldconfig not setup in official image
36 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
37 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
38 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
39 | ldconfig"
40 |
41 | ENV DEBIAN_FRONTEND noninteractive
42 |
43 | RUN apt-get update && apt-get install -y \
44 | apt-utils vim emacs make git libicu55 libedit2 \
45 | libicu-dev \
46 | autoconf libtool pkg-config \
47 | curl libcurl4-openssl-dev \
48 | libedit-dev \
49 | libxml2 \
50 | wget sudo gosu \
51 | clang-$CLANG_VERSION libc6-dev libxml2-dev bison lsb-release gdb \
52 | libsqlite3-dev \
53 | telnet netcat \
54 |
55 | RUN bash -c "update-alternatives --quiet --install /usr/bin/clang \
56 | clang /usr/bin/clang-$CLANG_VERSION 100;\
57 | update-alternatives --quiet --install /usr/bin/clang++ \
58 | clang++ /usr/bin/clang++-$CLANG_VERSION 100"
59 |
60 | # setup sudo # TODO: sounds like we are supposed to use gosu instead
61 |
62 | RUN bash -c "\
63 | useradd --groups sudo -ms /bin/bash swift; \
64 | echo 'swift ALL=(ALL:ALL) ALL' > /etc/sudoers.d/swift; \
65 | chmod 0440 /etc/sudoers.d/swift; \
66 | echo 'swift:swift' | chpasswd \
67 | "
68 |
69 | USER swift
70 | WORKDIR /home/swift
71 |
72 | RUN bash -c "\
73 | mkdir -p /home/swift/.emacs.d/lisp; \
74 | curl -L -o /home/swift/.emacs.d/lisp/swift-mode.el https://raw.githubusercontent.com/iamleeg/swift-mode/master/swift-mode.el; \
75 | echo \"(add-to-list 'load-path \\\"~/.emacs.d/lisp/\\\")\" >> .emacs; \
76 | echo \"(require 'swift-mode)\" >> .emacs; \
77 | echo \"(setq-default indent-tabs-mode nil)\" >> .emacs \
78 | "
79 |
--------------------------------------------------------------------------------
/grab-swift.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | DATEMARK="`date "+%Y%m%dT%H%M%S"`"
4 | TARBALL="swift-checkout-${DATEMARK}.tar.bz2"
5 |
6 | # this is huge and takes a long time!
7 | #helge@ZeeMBP raspi (master)$ ls -ladh swift-checkout.tar.bz2
8 | #-rw-r--r-- 1 helge staff 943M Apr 8 13:16 swift-checkout.tar.bz2
9 |
10 | mkdir -p swift-checkout
11 | cd swift-checkout
12 | git clone https://github.com/apple/swift
13 | ./swift/utils/update-checkout --clone
14 | cd ..
15 | tar jcf ${TARBALL} swift-checkout
16 |
--------------------------------------------------------------------------------
/make-swift-branch-tarball.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # ./make-swift-branch-tarball.sh swift-checkout swift-3.1.1-RELEASE
4 | # ./make-swift-branch-tarball.sh swift-checkout swift-3.1-RELEASE
5 | # ./make-swift-branch-tarball.sh swift-checkout swift-3.0.2-RELEASE
6 | # ./make-swift-branch-tarball.sh swift-checkout swift-4.0-branch
7 |
8 | OWN_DIR="`pwd`"
9 | SWIFT_DIR="$1"
10 | BRANCH="$2" # swift-3.1-RELEASE
11 |
12 | cd "${SWIFT_DIR}"
13 |
14 | # https://github.com/uraimo/buildSwiftOnARM/blob/master/checkoutRelease.sh
15 |
16 | find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "echo Cleaning '{}';cd '{}'; git reset --hard HEAD" \;
17 | find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "echo Updating '{}';cd '{}'; git pull; git fetch --tags" \;
18 | find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "echo Switching '{}' to ${BRANCH};cd '{}'; git checkout ${BRANCH}" \;
19 |
20 | # RPi
21 | #find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "echo Applying patches to '{}';cd '{}'; patch -p1 < ../'{}'.diffs/*.diff" \;
22 |
23 | tar zcf "${OWN_DIR}/$BRANCH.tgz" .
24 |
--------------------------------------------------------------------------------
/rpi-armv6-swift-4.1.3-uraimo-ctx/rpi-armv6-debian-stretch-swift-4.1.3.dockerfile:
--------------------------------------------------------------------------------
1 | FROM balenalib/raspberry-pi-debian:stretch
2 |
3 | LABEL maintainer "Helge Heß "
4 |
5 | ARG TARBALL_URL=https://www.dropbox.com/s/h6d2bwqs0gf997f/swift-4.1.3-RPi01-RaspbianStretch.tgz?dl=1
6 | ARG TARBALL_FILE=swift-4.1.3-RPi01-RaspbianStretch.tgz
7 |
8 | ENV DEBIAN_FRONTEND noninteractive
9 |
10 | # Funny: libcurl3 provies libcurl.so.4 :-)
11 | # Maybe libpython3.5 makes libpython2.7 obsolete?
12 | RUN apt-get update && apt-get install -y \
13 | git \
14 | libedit2 \
15 | libpython2.7 libcurl3 libxml2 libicu-dev \
16 | libc6-dev \
17 | libatomic1 \
18 | libpython3.5 \
19 | clang \
20 | && apt-get clean && rm -rf /var/lib/apt/lists/*
21 |
22 | # Uraimo's tarball starts at /
23 | RUN curl -L -o $TARBALL_FILE $TARBALL_URL && tar -xvzf $TARBALL_FILE -C / && rm $TARBALL_FILE
24 |
25 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
26 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
27 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
28 | ldconfig"
29 |
30 | RUN useradd -u 501 --create-home --shell /bin/bash swift
31 |
32 | USER swift
33 | WORKDIR /home/swift
34 |
--------------------------------------------------------------------------------
/rpi-armv6-swift-4.2.2-uraimo-ctx/rpi-armv6-debian-stretch-swift-4.2.2.dockerfile:
--------------------------------------------------------------------------------
1 | FROM balenalib/raspberry-pi-debian:stretch
2 |
3 | LABEL maintainer "Helge Heß "
4 |
5 | ARG TARBALL_URL=https://www.dropbox.com/s/08aem3xndyfafdi/swift-4.2.2-RPi01-RaspbianStretch.tgz?dl=1
6 | ARG TARBALL_FILE=swift-4.2.2-RPi01-RaspbianStretch.tgz
7 |
8 | ENV DEBIAN_FRONTEND noninteractive
9 |
10 | # Funny: libcurl3 provies libcurl.so.4 :-)
11 | # Maybe libpython3.5 makes libpython2.7 obsolete?
12 | RUN apt-get update && apt-get install -y \
13 | git \
14 | libedit2 \
15 | libpython2.7 libcurl3 libxml2 libicu-dev \
16 | libc6-dev \
17 | libatomic1 \
18 | libpython3.5 \
19 | clang \
20 | && apt-get clean && rm -rf /var/lib/apt/lists/*
21 |
22 | # Uraimo's tarball starts at /
23 | RUN curl -L -o $TARBALL_FILE $TARBALL_URL && tar -xvzf $TARBALL_FILE -C / && rm $TARBALL_FILE
24 |
25 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
26 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
27 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
28 | ldconfig"
29 |
30 | RUN useradd -u 501 --create-home --shell /bin/bash swift
31 |
32 | USER swift
33 | WORKDIR /home/swift
34 |
--------------------------------------------------------------------------------
/rpi-swift-3.1.0-build-ctx/rpi-raspbian-swift-build31-env.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # Just copy in Swift 3.1 to avoid the overhead when playing with the
4 | # compile.
5 |
6 | FROM helje5/rpi-raspbian-swift-build-env
7 |
8 | ENV DEBIAN_FRONTEND noninteractive
9 |
10 | ADD swift-3.1-RELEASE.tgz /swiftsrc
11 |
--------------------------------------------------------------------------------
/rpi-swift-3.1.0-build-ctx/rpi-ubuntu-swift-build31-env.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # Just copy in Swift 3.1 to avoid the overhead when playing with the
4 | # compile.
5 |
6 | FROM helje5/rpi-ubuntu-swift-build-env
7 |
8 | ENV DEBIAN_FRONTEND noninteractive
9 |
10 | ADD swift-3.1-RELEASE.tgz /swiftsrc
11 |
--------------------------------------------------------------------------------
/rpi-swift-3.1.0-ctx/rpi-ubuntu-swift-3.1.0.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run -i --tty --rm helje5/rpi-swift:3.1.0
4 | #
5 | FROM ioft/armhf-ubuntu:16.04
6 |
7 | LABEL maintainer "Helge Heß "
8 |
9 | ARG TARBALL=swift-3.1-armv7l-ubuntu-16.04.tar.gz
10 |
11 | ENV DEBIAN_FRONTEND noninteractive
12 |
13 | RUN apt-get update
14 |
15 | # Funny: libcurl3 provies libcurl.so.4 :-)
16 | RUN apt-get install -y \
17 | git \
18 | libedit2 \
19 | libpython2.7 libcurl3 libxml2 libicu55 \
20 | libc6-dev
21 |
22 | ADD $TARBALL /usr/
23 |
24 | RUN useradd --create-home --shell /bin/bash swift
25 |
26 | USER swift
27 | WORKDIR /home/swift
28 |
--------------------------------------------------------------------------------
/rpi-swift-3.1.1-build-ctx/rpi-raspbian-swift-build311-env.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # Just copy in Swift 3.1.1 to avoid the overhead when playing with the
4 | # compile.
5 |
6 | FROM helje5/rpi-raspbian-swift-build-env
7 |
8 | ADD swift-3.1.1-RELEASE.tgz /swiftsrc
9 |
--------------------------------------------------------------------------------
/rpi-swift-3.1.1-build-ctx/rpi-ubuntu-swift-build311-env.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # Just copy in Swift 3.1.1 to avoid the overhead when playing with the
4 | # compile.
5 |
6 | FROM helje5/rpi-ubuntu-swift-build-env
7 |
8 | ADD swift-3.1.1-RELEASE.tgz /swiftsrc
9 |
--------------------------------------------------------------------------------
/rpi-swift-3.1.1-ctx/rpi-ubuntu-swift-3.1.1.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # docker run -i --tty --rm helje5/rpi-swift:3.1.1
4 | #
5 | FROM ioft/armhf-ubuntu:16.04
6 |
7 | LABEL maintainer "Helge Heß "
8 |
9 | ARG TARBALL=swift-3.1.1-armv7l-ubuntu-16.04.tar.gz
10 |
11 | ENV DEBIAN_FRONTEND noninteractive
12 |
13 | RUN apt-get update
14 |
15 | # Funny: libcurl3 provies libcurl.so.4 :-)
16 | RUN apt-get install -y \
17 | git \
18 | libedit2 \
19 | libpython2.7 libcurl3 libxml2 libicu55 \
20 | libc6-dev
21 |
22 | ADD $TARBALL /usr/
23 |
24 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
25 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
26 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
27 | ldconfig"
28 |
29 | RUN useradd --create-home --shell /bin/bash swift
30 |
31 | USER swift
32 | WORKDIR /home/swift
33 |
34 |
--------------------------------------------------------------------------------
/rpi-swift-302-build-ctx/rpi-raspbian-swift-build302-env.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # Just copy in Swift 3.0.2 to avoid the overhead when playing with the
4 | # compile.
5 |
6 | FROM helje5/rpi-raspbian-swift-build-env
7 |
8 | ENV DEBIAN_FRONTEND noninteractive
9 |
10 | ADD swift-3.0.2-RELEASE.tgz /swiftsrc
11 |
--------------------------------------------------------------------------------
/rpi-swift-302-ctx/rpi-raspbian-swift-302.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | FROM resin/rpi-raspbian
4 |
5 | ENV DEBIAN_FRONTEND noninteractive
6 |
7 | RUN apt-get update
8 | RUN apt-get install -y \
9 | git \
10 | libedit2 \
11 | libpython2.7 curl libxml2 libicu52
12 |
13 | # wget https://www.dropbox.com/s/kmu5p6j0otz3jyr/swift-3.0.2-RPi23-RaspbianNov16.tgz
14 | ADD swift-3.0.2-RPi23-RaspbianNov16.tgz /
15 |
--------------------------------------------------------------------------------
/rpi-swift-4.0.x-build-ctx/rpi-ubuntu-swift-build40x-env.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # Just copy in Swift 4.0.x snapshot to avoid the overhead when playing with the
4 | # compile.
5 |
6 | FROM helje5/rpi-ubuntu-swift-build-env
7 |
8 | ADD swift-4.0-branch.tgz /swiftsrc
9 |
--------------------------------------------------------------------------------
/rpi-swift-4.1.0-chnmrc-ctx/dispatch-module.modulemap:
--------------------------------------------------------------------------------
1 | module Dispatch {
2 | requires blocks
3 | export *
4 | link "dispatch"
5 | }
6 |
7 | module DispatchIntrospection [system] [extern_c] {
8 | header "introspection.h"
9 | export *
10 | }
11 |
12 | module CDispatch [system] [extern_c] {
13 | umbrella header "dispatch.h"
14 | export *
15 | requires blocks
16 | link "dispatch"
17 | }
18 |
--------------------------------------------------------------------------------
/rpi-swift-4.1.0-chnmrc-ctx/rpi-ubuntu-swift-4.1.0.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # First download the prebuild binaries (~170MB), does NOT contain SPM!:
4 | #
5 | # curl -L -o swift-4.1-RELEASE-ARMV7-GLIBC2.23-chnmrc-2018-06-06.tgz https://www.dropbox.com/s/yauj3tyyh90cl05/swift-4.1-release-NOSPM-ARMV7-ubuntu-16.04-chnmrc.tgz?dl=1
6 | #
7 | # docker run -i --tty --rm helje5/rpi-swift:4.1.0
8 | #
9 | FROM ioft/armhf-ubuntu:16.04
10 |
11 | LABEL maintainer "Helge Heß "
12 |
13 | ARG TARBALL=swift-4.1-RELEASE-ARMV7-GLIBC2.23-chnmrc-2018-06-06.tgz
14 |
15 | ENV DEBIAN_FRONTEND noninteractive
16 |
17 | RUN apt-get update
18 | RUN apt-get upgrade -y
19 |
20 | # Funny: libcurl3 provies libcurl.so.4 :-)
21 | # Maybe libpython3.5 makes libpython2.7 obsolete?
22 | # libcurl3-nss is required by latest chnmrc drop
23 | RUN apt-get install -y \
24 | git \
25 | libedit2 \
26 | libpython2.7 libcurl3 libxml2 libicu55 \
27 | libc6-dev \
28 | libatomic1 \
29 | libpython3.5 \
30 | libcurl3-nss
31 |
32 |
33 | # Chnmrc's tarball starts at /
34 | ADD $TARBALL /
35 |
36 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
37 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
38 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
39 | ldconfig"
40 |
41 | RUN useradd -u 501 --create-home --shell /bin/bash swift
42 |
43 | USER swift
44 | WORKDIR /home/swift
45 |
--------------------------------------------------------------------------------
/rpi-swift-4.1.2-chnmrc-ctx/rpi-ubuntu-swift-4.1.2.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # First download the prebuild binaries (~170MB), does NOT contain SPM!:
4 | #
5 | # curl -o swift-4.1.2-RELEASE-ARMv7-chnmrc-2018-06-19.tgz http://mchini.com/swift/swift-4.1.2-RELEASE-ARMv7.tgz
6 | # curl -L -o swift-4.1-RELEASE-ARMV7-GLIBC2.23-chnmrc-2018-06-06.tgz https://www.dropbox.com/s/yauj3tyyh90cl05/swift-4.1-release-NOSPM-ARMV7-ubuntu-16.04-chnmrc.tgz?dl=1
7 | #
8 | # docker run -i --tty --rm helje5/rpi-swift:4.1.0
9 | #
10 | FROM ioft/armhf-ubuntu:16.04
11 |
12 | LABEL maintainer "Helge Heß "
13 |
14 | ARG TARBALL=swift-4.1.2-RELEASE-ARMv7-chnmrc-2018-06-19.tgz
15 |
16 | ENV DEBIAN_FRONTEND noninteractive
17 |
18 | RUN apt-get update
19 | RUN apt-get upgrade -y
20 |
21 | # Funny: libcurl3 provies libcurl.so.4 :-)
22 | # Maybe libpython3.5 makes libpython2.7 obsolete?
23 | # libcurl3-nss is required by latest chnmrc drop
24 | RUN apt-get install -y \
25 | git \
26 | libedit2 \
27 | libpython2.7 libcurl3 libxml2 libicu55 \
28 | libc6-dev \
29 | libatomic1 \
30 | libpython3.5 \
31 | libcurl3-nss
32 |
33 |
34 | # Chnmrc's tarball starts at /
35 | ADD $TARBALL /
36 |
37 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
38 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
39 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
40 | ldconfig"
41 |
42 | RUN useradd -u 501 --create-home --shell /bin/bash swift
43 |
44 | USER swift
45 | WORKDIR /home/swift
46 |
--------------------------------------------------------------------------------
/rpi-swift-4.1.x-uraimo-ctx/rpi-ubuntu-swift-4.1.x.dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | # First download the prebuild binaries (~170MB), does NOT contain SPM!:
4 | #
5 | # curl -L -o swift-4.1.alpha1-armv7l-ubuntu16.04.tar.gz https://www.dropbox.com/s/403lkj84w0ifcye/raspi-swift-4.1-branch_nospm.tgz?dl=1
6 | #
7 | # docker run -i --tty --rm helje5/rpi-swift:4.1.alpha1
8 | #
9 | FROM ioft/armhf-ubuntu:16.04
10 |
11 | LABEL maintainer "Helge Heß "
12 |
13 | ARG TARBALL=swift-4.1.alpha1-armv7l-ubuntu16.04.tar.gz
14 |
15 | ENV DEBIAN_FRONTEND noninteractive
16 |
17 | RUN apt-get update
18 |
19 | # Funny: libcurl3 provies libcurl.so.4 :-)
20 | # Maybe libpython3.5 makes libpython2.7 obsolete?
21 | RUN apt-get install -y \
22 | git \
23 | libedit2 \
24 | libpython2.7 libcurl3 libxml2 libicu55 \
25 | libc6-dev \
26 | libatomic1 \
27 | libpython3.5
28 |
29 | # Uraimo's tarball starts at /
30 | ADD $TARBALL /
31 |
32 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
33 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
34 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
35 | ldconfig"
36 |
37 | RUN useradd -u 501 --create-home --shell /bin/bash swift
38 |
39 | USER swift
40 | WORKDIR /home/swift
41 |
42 |
--------------------------------------------------------------------------------
/rpi-swift-4.2.2-uraimo-ctx/rpi-debian-swift-4.2.2.dockerfile:
--------------------------------------------------------------------------------
1 | FROM balenalib/raspberrypi3-debian:stretch
2 |
3 | LABEL maintainer "Helge Heß "
4 |
5 | ARG TARBALL_URL=https://www.dropbox.com/s/b9gizkdqifhqcdh/swift-4.2.2-RPi23-RaspbianStretch.tgz?dl=1
6 | ARG TARBALL_FILE=swift-4.2.2-RPi23-RaspbianStretch
7 |
8 | ENV DEBIAN_FRONTEND noninteractive
9 |
10 | # Funny: libcurl3 provies libcurl.so.4 :-)
11 | # Maybe libpython3.5 makes libpython2.7 obsolete?
12 | RUN apt-get update && apt-get install -y \
13 | git \
14 | libedit2 \
15 | libpython2.7 libcurl3 libxml2 libicu-dev \
16 | libc6-dev \
17 | libatomic1 \
18 | libpython3.5 \
19 | clang \
20 | && apt-get clean && rm -rf /var/lib/apt/lists/*
21 |
22 | # Uraimo's tarball starts at /
23 | RUN curl -L -o $TARBALL_FILE $TARBALL_URL && tar -xvzf $TARBALL_FILE -C / && rm $TARBALL_FILE
24 |
25 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
26 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
27 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
28 | ldconfig"
29 |
30 | RUN useradd -u 501 --create-home --shell /bin/bash swift
31 |
32 | USER swift
33 | WORKDIR /home/swift
34 |
--------------------------------------------------------------------------------
/rpi-swift-4.2.2-uraimo-ctx/rpi-ubuntu-swift-4.2.2.dockerfile:
--------------------------------------------------------------------------------
1 | FROM ioft/armhf-ubuntu:16.04
2 |
3 | LABEL maintainer "Helge Heß "
4 |
5 | ARG TARBALL_URL=https://www.dropbox.com/s/qnf7p988lp46mlq/swift-4.2.2-RPi23-Ubuntu1604.tgz?dl=1
6 | ARG TARBALL_FILE=swift-4.2.2-RPi23-Ubuntu1604.tgz
7 |
8 | ENV DEBIAN_FRONTEND noninteractive
9 |
10 | # Maybe libpython3.5 makes libpython2.7 obsolete?
11 | RUN apt-get update && apt-get install -y \
12 | git \
13 | libedit2 \
14 | libpython2.7 libcurl3-nss libxml2 libicu55 \
15 | libc6-dev \
16 | libatomic1 \
17 | libpython3.5 \
18 | clang \
19 | curl \
20 | && apt-get clean && rm -rf /var/lib/apt/lists/*
21 |
22 | # Uraimo's tarball starts at /
23 | RUN curl -L -o $TARBALL_FILE $TARBALL_URL && tar -xvzf $TARBALL_FILE -C / && rm $TARBALL_FILE
24 |
25 | RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\
26 | echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\
27 | echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\
28 | ldconfig"
29 |
30 | RUN useradd -u 501 --create-home --shell /bin/bash swift
31 |
32 | USER swift
33 | WORKDIR /home/swift
34 |
--------------------------------------------------------------------------------
/swift-6.1-dev/Dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile
2 | #
3 | FROM swift:6.1
4 |
5 | LABEL maintainer "Helge Heß "
6 |
7 | ENV DEBIAN_FRONTEND noninteractive
8 |
9 | RUN apt-get update
10 | RUN apt-get upgrade -y
11 |
12 | # Maybe libpython3.5 makes libpython2.7 obsolete?
13 | #libpython2.7
14 | #libpython3.5
15 | RUN apt-get install -y \
16 | git \
17 | libedit2 \
18 | libcurl4 libxml2 \
19 | libc6-dev \
20 | libatomic1 \
21 | curl \
22 | libcrypt-dev \
23 | vim \
24 | emacs
25 |
26 | RUN useradd -u 501 --create-home --shell /bin/bash swift
27 |
28 | USER swift
29 | WORKDIR /home/swift
30 |
--------------------------------------------------------------------------------
/swift-6.1-dev/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile
2 |
3 | DOCKER_IMAGE=helje5/swift-dev
4 | DOCKER_IMAGE_VERSION=6.1.0
5 |
6 | # local config
7 | SWIFT_BUILD=swift build
8 | SWIFT_CLEAN=swift package clean
9 | SWIFT_BUILD_DIR=.build
10 | SWIFT_TEST=swift test
11 | CONFIGURATION=release
12 |
13 | # To build specific platforms:
14 | # --platform linux/amd64
15 | # --platform linux/amd64,linux/arm64
16 |
17 | # docker config
18 | DOCKER_BUILD_CONTEXT=desktop-linux
19 | DOCKER_BUILD_DIR=".docker.build"
20 | SWIFT_BUILD_IMAGE="swift:6.1"
21 | DOCKER_BUILD_PRODUCT="$(DOCKER_BUILD_DIR)/$(TOOL_NAME)"
22 | DOCKER_BUILD_TAG=$(DOCKER_IMAGE):$(DOCKER_IMAGE_VERSION)
23 | DOCKER_BUILD_TAG_AMD64=$(DOCKER_IMAGE):$(DOCKER_IMAGE_VERSION)-amd64
24 | DOCKER_BUILD_TAG_ARM=$(DOCKER_IMAGE):$(DOCKER_IMAGE_VERSION)-aarch64
25 |
26 | DOCKERFILE=Dockerfile
27 | DOCKER_PUBLISH_CONTEXT=desktop-linux
28 |
29 | all:
30 | @echo "use 'make build' target to build"
31 | @echo "use 'make run' to try the container"
32 |
33 | docker-local-build:
34 | mkdir -p $(PWD)/empty-ctx
35 | time docker build \
36 | --no-cache \
37 | -t $(DOCKER_BUILD_TAG_ARM) \
38 | -f $(DOCKERFILE) \
39 | $(PWD)/empty-ctx
40 | docker images | grep $(DOCKER_IMAGE)
41 |
42 | docker-build-multiplatform:
43 | time docker build \
44 | --platform linux/amd64 \
45 | --platform linux/aarch64 \
46 | --no-cache \
47 | -t $(DOCKER_BUILD_TAG) \
48 | -f $(DOCKERFILE) \
49 | $(PWD)/empty-ctx
50 | docker images | grep $(DOCKER_IMAGE)
51 |
52 | docker-local-build-amd64:
53 | time docker build \
54 | --platform linux/amd64 \
55 | --no-cache \
56 | -t $(DOCKER_BUILD_TAG_AMD64) \
57 | -f $(DOCKERFILE) \
58 | $(PWD)/empty-ctx
59 | docker images | grep $(DOCKER_IMAGE)
60 |
61 |
62 |
63 | fetch :
64 | wget $(PKG_DOWNLOAD_URL)/$(DERIVED_TARBALL)
65 |
66 | build:
67 | time docker build \
68 | -t helje5/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG) \
69 | -t helje5/$(DOCKER_IMAGE_NAME):$(DOCKER_LATEST_TAG) \
70 | -f $(DOCKER_CPU)-$(SWIFT_OS)-$(SWIFTOSVERSION)-swift-$(SWIFT_FULL_VERSION).dockerfile \
71 | $(PWD)
72 | docker images | grep $(DOCKER_USER)/$(DOCKER_CPU)
73 |
74 | publish:
75 | time docker push $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG)
76 | time docker push $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_LATEST_TAG)
77 |
78 | run:
79 | docker run --rm --interactive --tty --name "swift-run" \
80 | $(DOCKER_USER)/$(DOCKER_IMAGE_NAME):$(DOCKER_FULL_VERSION_TAG)
81 |
--------------------------------------------------------------------------------
/toolchain/README.md:
--------------------------------------------------------------------------------
1 | macOS -> RasPi Cross Compilation Toolchain
2 |
4 |
5 |
6 | 
7 | 
8 | 
9 |
10 | NOTE: This subproject moved to its own repository:
11 | [AlwaysRightInstitute/swift-mac2arm-x-compile-toolchain](https://github.com/AlwaysRightInstitute/swift-mac2arm-x-compile-toolchain)
12 |
13 | What this is good for?
14 | You can build Raspberry Pi Swift binaries on a Mac. Like this:
15 | ```
16 | mkdir helloworld && cd helloworld
17 | swift package init --type=executable
18 | swift build --destination /tmp/cross-toolchain/rpi-ubuntu-xenial-destination.json
19 | file .build/debug/helloworld
20 | .build/debug/helloworld: ELF 32-bit LSB executable, ARM,
21 | EABI5 version 1 (SYSV), dynamically linked,
22 | interpreter /lib/ld-linux-armhf.so.3,
23 | for GNU/Linux 3.2.0, not stripped
24 | ```
25 |
--------------------------------------------------------------------------------