GithubHelp home page GithubHelp logo

classicvalues / swift-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apple/swift-docker

0.0 1.0 0.0 374 KB

Docker Official Image packaging for Swift

Home Page: https://swift.org

License: Apache License 2.0

Dockerfile 98.19% Python 1.23% Shell 0.58%

swift-docker's Introduction

swift-docker

Swift logo

Docker images for Swift.

You can find the Docker Hub repo here: https://hub.docker.com/_/swift/

Usage

Pull the Docker image from Docker Hub:
docker pull swift
Create a container from the image and run it:
docker run -it swift /bin/bash

If you want to run the Swift REPL you will need to run the container with additional privileges:

# If running Docker on Linux:
docker run --security-opt seccomp=unconfined -it swift

# If running Docker on macOS:
docker run --privileged -it swift

We also provide a "slim" image. Slim images are images designed just for running an already built Swift program. Consequently, they do not contain the Swift compiler.

The normal and slim images can be combined via a multi-stage Dockerfile to produce a lighter-weight image ready for deployment. For example:

FROM swift:latest as builder
WORKDIR /root
COPY . .
RUN swift build -c release

FROM swift:slim
WORKDIR /root
COPY --from=builder /root .
CMD [".build/release/docker-test"]

Contributions

Contributions via pull requests are welcome and encouraged :)

License

docker-swift is licensed under the Apache License, Version 2.0.

swift-docker's People

Contributors

shahmishal avatar swizzlr avatar hamin avatar gwynne avatar khalian avatar lgaches avatar drexin avatar florianreinhart avatar ianpartridge avatar weissi avatar schafdog avatar tomerd avatar briancroom avatar fabianfett avatar tachoknight avatar compnerd avatar zwaldowski avatar classicvalues avatar gabhi avatar aidansteele avatar antonmes avatar tid-kijyun avatar fud avatar bppr avatar ethan-kusters avatar jgiola avatar foulkesjohn avatar bamx23 avatar crowdhailer avatar rpitonak avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.