Swiftpack.co - Package - iainsmith/swift-docker

swift-docker

Test your swift package is Linux compatible using one command. swift docker test

Install swift-docker

brew tap iainsmith/formulae
brew install swift-docker
or from source
> git clone https://github.com/iainsmith/swift-docker.git
> cd swift-docker
> swift build -c release -Xswiftc -static-stdlib
# copy the binary to somewhere in your path. 
> cp ./.build/x86_64-apple-macosx10.10/release/swift-docker ~/bin

And install docker if you don't have it already
  • Download the Docker Mac App.
  • Alternatively install via homebrew brew install docker

Usage

Run the Tests

# Against the latest version of swift
swift docker test

# Against a swift version
swift docker test --swift 4.0

# Using a specific image
swift docker test --image ibmcom/swift-ubuntu:4.1

# Run tests and save dockerfile
swift docker test --image ibmcom/swift-ubuntu:4.1 --write-dockerfile  

Save the default dockerfile to ./Dockerfile

swift docker write-dockerfile

Cleanup docker images generated by swift-docker

swift docker cleanup

Credits

swift-docker is built on top of

Contributing

If you have suggestions for new commands, features or bug fixes. Please raise an issue or open a PR.

If you find this tool useful in your workflow let me know on twitter @_iains

Github

link
Stars: 80
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

0.1.1 - Apr 12, 2018

First Release of swift-docker cli extensions.

Supported Commands

swift docker test
swift docker write-dockerfile
swift docker cleanup