This repository was archived by the owner on Oct 14, 2020. It is now read-only.
This repository was archived by the owner on Oct 14, 2020. It is now read-only.
Refactor Dockerfiles #328
Closed
Description
Dockerfiles need to be refactored to reduce image sizes, follow best practices and ensure reproducibility.
Example
codewars/swift-runner
Problems
- Download size is
2.7 GB
😱 - Swift version not specified 😱
Possible Solutions
-
Download (L33), build (L45) and remove (L49) in the same layer.
# L33 RUN git clone https://github.com/apple/swift.git && ./swift/utils/update-checkout --clone # 783.3 MB # L45 RUN utils/build-script --preset-file=codewars-build-presets.ini --preset=codewars_linux_1404 install_destdir=$SWIFT_GEN_DIR installable_package=$SWIFT_GEN_DIR/swift.tar.gz # 944.1 MB # L49 RUN rm -rf $SWIFT_SOURCE_DIR/*
-
Find a better way to get the source at specific version. Cloning the entire history shouldn't be necessary.
3.0-dev
(Language Support Status)- swift-3.0-RELEASE (
2016-09-13
) - swift-3.0.1-RELEASE (
2016-10-28
) - swift-3.0.2-RELEASE (
2016-12-13
)