swift
Estimated reading time: 3 minutesSwift is a high-performance system programming language, to learn more about Swift visit swift.org.
GitHub repo: https://github.com/apple/swift-docker
Library reference
This content is imported from the official Docker Library docs, and is provided by the original uploader. You can view the Docker Hub page for this image at https://hub.docker.com/images/swift
Supported tags and respective Dockerfile
links
5.0
,5.0-bionic
,bionic
,latest
(5.0/ubuntu/18.04/Dockerfile)5.0-xenial
,xenial
(5.0/ubuntu/16.04/Dockerfile)4.2.4
,4.2
,4
(4.2/ubuntu/16.04/Dockerfile)4.2.3
(4.2/ubuntu/16.04/Dockerfile)4.2.2
(4.2/ubuntu/16.04/Dockerfile)4.2.1
(4.2/Dockerfile)4.1.3
,4.1
(4.1/Dockerfile)4.0.3
,4.0
(4.0/Dockerfile)3.1.1
,3.1
,3
(3.1/Dockerfile)
Quick reference
-
Where to get help:
Swift Docker Community Forums -
Where to file issues:
https://bugs.swift.org Component: Docker -
Maintained by:
the Swift Community -
Published image artifact details:
repo-info repo’srepos/swift/
directory (history)
(image metadata, transfer size, etc) -
Image updates:
official-images PRs with labellibrary/swift
official-images repo’slibrary/swift
file (history) -
Source of this description:
docs repo’sswift/
directory (history) -
Supported Docker versions:
the latest release (down to 1.6 on a best-effort basis)
What is Swift?
Swift is a high-performance system programming language. It has a clean and modern syntax, offers seamless access to existing C and Objective-C code and frameworks, and is memory safe by default.
Although inspired by Objective-C and many other languages, Swift is not itself a C-derived language. As a complete and independent language, Swift packages core features like flow control, data structures, and functions, with high-level constructs like objects, protocols, closures, and generics. Swift embraces modules, eliminating the need for headers and the code duplication they entail.
To learn more about the programming language, visit swift.org.
How to use this image
Start a REPL
Swift requires a little bit of extra security privilege to run the REPL. The following command creates an ephemeral container, attaches your terminal to it and starts the Swift REPL. A great way to try out pre-release builds!
docker run --cap-add sys_ptrace -it --rm swift swift
Pull the Docker Image From Docker Hub:
docker pull swift
Create a Container from the Image and Attach It:
docker run -it --name swiftfun swift /bin/bash
To Start and Attach Your Image Later:
Start your image with name swiftfun
docker start swiftfun
and then attach it
docker attach swiftfun
License
View license information for the software contained in this image.
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
Some additional license information which was able to be auto-detected might be found in the repo-info
repository’s swift/
directory.
As for any pre-built image usage, it is the image user’s responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.