# Supported tags and respective `Dockerfile` links - [`3.0.2`, `3.0`, `3`, `latest` (*Dockerfile*)](https://github.com/swiftdocker/docker-swift/blob/94a43272fe6411c12045414cfc797d3c0bcf2823/Dockerfile) For more information about this image and its history, please see [the relevant manifest file (`library/swift`)](https://github.com/docker-library/official-images/blob/master/library/swift). This image is updated via [pull requests to the `docker-library/official-images` GitHub repo](https://github.com/docker-library/official-images/pulls?q=label%3Alibrary%2Fswift). For detailed information about the virtual/transfer sizes and individual layers of each of the above supported tags, please see [the `repos/swift/tag-details.md` file](https://github.com/docker-library/repo-info/blob/master/repos/swift/tag-details.md) in [the `docker-library/repo-info` GitHub repo](https://github.com/docker-library/repo-info). # What is Swift? Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns. The goal of the Swift project is to create the best available language for uses ranging from systems programming, to mobile and desktop apps, scaling up to cloud services. Most importantly, Swift is designed to make writing and maintaining correct programs easier for the developer. To achieve this goal, we believe that the most obvious way to write Swift code must also be: **Safe**. The most obvious way to write code should also behave in a safe manner. Undefined behavior is the enemy of safety, and developer mistakes should be caught before software is in production. Opting for safety sometimes means Swift will feel strict, but we believe that clarity saves time in the long run. **Fast**. Swift is intended as a replacement for C-based languages (C, C++, and Objective-C). As such, Swift must be comparable to those languages in performance for most tasks. Performance must also be predictable and consistent, not just fast in short bursts that require clean-up later. There are lots of languages with novel features — being fast is rare. **Expressive**. Swift benefits from decades of advancement in computer science to offer syntax that is a joy to use, with modern features developers expect. But Swift is never done. We will monitor language advancements and embrace what works, continually evolving to make Swift even better. > [wikipedia.org/wiki/Swift_(programming_language)](https://en.wikipedia.org/wiki/Swift_(programming_language)) > [swift.org](https://swift.org/about/) > [Swift on Github](https://github.com/apple/swift) ![logo](https://raw.githubusercontent.com/docker-library/docs/0ae8e1438b3eb5d942ae5f04dee8768911f46b01/swift/logo.png) # How to use this image ##### Start a REPL Swift requires [a little bit of extra security privilege](https://github.com/swiftdocker/docker-swift/issues/9#issuecomment-272527182) 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! ```bash docker run --cap-add sys_ptrace -it --rm swift swift ``` ##### Pull the Docker Image From Docker Hub: ```bash docker pull swift ``` ##### Create a Container from the Image and Attach It: ```bash docker run -it --name swiftfun swift:latest /bin/bash ``` ##### To Start and Attach Your Image Later: Start your image with name `swiftfun` ```bash docker start swiftfun ``` and then attach it ```bash docker attach swiftfun ``` # License View [license information](https://swift.org/LICENSE.txt) for the software contained in this image. # Supported Docker versions This image is officially supported on Docker version 1.13.0. Support for older versions (down to 1.6) is provided on a best-effort basis. Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. # User Feedback ## Issues If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/swiftdocker/docker-swift/issues). If the issue is related to a CVE, please check for [a `cve-tracker` issue on the `official-images` repository first](https://github.com/docker-library/official-images/issues?q=label%3Acve-tracker). You can also reach many of the official image maintainers via the `#docker-library` IRC channel on [Freenode](https://freenode.net). ## Contributing You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/swiftdocker/docker-swift/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. ## Documentation Documentation for this image is stored in the [`swift/` directory](https://github.com/docker-library/docs/tree/master/swift) of the [`docker-library/docs` GitHub repo](https://github.com/docker-library/docs). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/docker-library/docs/blob/master/README.md) before attempting a pull request.