Autogenerated by https://github.com/happn-app/swift-docker/blob/master/build_swift_stretch.sh, based on https://github.com/happn-app/swift-docker/blob/master/context_stretch/Dockerfile.builder.base.
https://github.com/happn-app/swift-docker/issues
This image is an extension of the happn/swift
image that allows directly compiling a Swift project for Debian Stretch from its git URL.
The entry point of the image is a script that takes a git URL, a set of optional dependencies and build the package at the given URL in /mnt/output
. You can retrieve the built product by mounting /mnt/output
. Don’t forget to install the swiftlang-libs deb (available in the resulting “products” folder after the build is successful) before running the executable outside the Docker.
Example of use:
docker run -v "$(pwd)/VaporBuild:/mnt/output" --rm -it happn/swift-builder:5.2.1-RELEASE --enable-automatic-resolution https://github.com/vapor/vapor.git=4.0.1 libssl1.0-dev zlib1g-dev pkg-config
#Point by point:
# docker run Run docker
# -v "$(pwd)/VaporBuild:/mnt/output" Mount /mnt/output in ./VaporBuild (in order to retrieve the built products)
# --rm -it Remove the container after the build is complete, and attach with tty while running
# happn/swift-builder:5.2.1-RELEASE The image to run
# --enable-automatic-resolution Vapor does not include a Package.resolved file, so we have to enable automatic Package resolution
# https://github.com/vapor/vapor.git=4.0.1 The URL of the project to build, with the branch/tag/commit to build (here master; optional)
# libssl1.0-dev zlib1g-dev pkg-config The dependencies required to build the project
Usage:
usage: ./context_stretch/build_swift_package.sh [--static] [--disable-test-discovery] [--enable-automatic-resolution] git_url[=treeish_object] [build_dependency1, build_dependency2, ...]
note: The static option might not work on Linux.