[swift-server-dev] Announcement: Official Docker Image for Swift now available
aminharis7 at gmail.com
Sun Jan 22 17:01:00 CST 2017
Super excited about this :)
Would love to get CI access from swift core team as detailed in this github
Helge regarding some of your concerns. They're for sure valid. But if you
look at how many ppl are deploying apps to production indeed in various
languages in a Docker env, they base they're dockerfile on a common image
Languages such as go, you don't actually need to have go installed on your
docker/server/virtualized environment. However in order to have
reproducible production builds, most ppl still deploy with go as a base
image and build all there project dependencies to push to a produciton
environment. Is this absolutely necessary, probably not. However is still
very common. You can (and I've done this in the past) just create your
linux binary in on your local machine and just deploy that (or have that
built as part of your CI pipeline).
Other languages such as ruby/python/nodejs where you can't really have a
static binary that works on any server/virtualized env without having the
language toolset installed you are in a 'way' deploying dev environments
(albeit perhaps a stripped down less verbose one).
Our goal was to basically provide a common, easily up to date dockerized
swift image that ppl can choose to deploy to production apps/development/CI
whatever there heart desires :).
As you can see the Dockerfile isn't that complicated, just a lil bash done
in a more 'docker' friendly way that installs other depencencies necessary
to actually run 'swift build' against your app on ubuntu. This might all
change when/if we have official swift installations available on package
managers such as aptitude (apt get install swift), but I think Swift core
isn't there yet.
So we're just trying to make the process a bit easier. Any suggestions to
make things better/slimmer of course are welcome :)
On Sun, Jan 22, 2017 at 4:14 PM, Helge Heß via swift-server-dev <
swift-server-dev at swift.org> wrote:
> On 22 Jan 2017, at 21:57, Swizzlr <me at swizzlr.co> wrote:
> > That's a great question. We're satisfied that the 400MB image size isn't
> _too_ onerous for the majority of users - especially since one of the
> benefits of Docker is that per host, that 400MB will only be used once
> (copy on write FS) - but there can never be enough done.
> Well, that doesn’t address my question 'What does 'Dockerizing Swift’
> mean?’. Which is why that container is even needed. Anyone can choose his
> base distribution on size or features and install Swift in like 3 lines of
> bash. What is the idea behind this? Does it anything extra beyond unpacking
> the tarball?
> > We have an issue open that addresses this exact topic:
> https://github.com/swiftdocker/docker-swift/issues/48. Of particular
> interest is how to export a Swift binary that is statically linked; perhaps
> a base image containing the Swift runtime support libs (ICU, Foundation,
> Core etc) would be ideal.
> In case this isn’t clear my primary concern is not just size but rather
> hackability. A Swift Server app container should really just have the stuff
> required to host that specific binary to avoid attack vectors.
> But yes, this GitHub issue addresses the exact topic I have in mind :-)
> And I don’t think it should be addressed at the Docker level. I guess the
> Swift tarball needs to be split up into a runtime and a development
> environment. Kinda like Java JRE and JDK.
> > In case I haven't covered every base: the final benefit is a
> reproducible development environment, one that is the same on our machines
> and the server.
> I hope you don’t really deploy dev environments to a server ;->
> > Tom
> > Sent from my iPhone
> > On 22 Jan 2017, at 19:47, Helge Heß via swift-server-dev <
> swift-server-dev at swift.org> wrote:
> >> Hi,
> >> someone told me about this too. I don’t want to lower the work involved
> in that, but I suppose I just don’t understand what this is about. What
> does 'Dockerizing Swift’ mean? Isn’t that just
> >> wget <swift-tarball>
> >> tar zxf <swift-tarball>
> >> export PATH=$PATH:swift-tarball
> >> ? Or does it anything extra?
> >> I think something which would be really helpful is a docker setup that
> is separating the build and the deployment step. That is, if I deploy a
> Swift Server app the last thing I want is to ship Swift llvm or clang, etc,
> but just the app and the runtime. Is someone working on something like that
> >> hh
> >>> On 22 Jan 2017, at 19:18, Swizzlr via swift-server-dev <
> swift-server-dev at swift.org> wrote:
> >>> In case any you aren't/weren't subscribed to the Swift Users list.
> Link to thread: https://lists.swift.org/pipermail/swift-users/Week-of-
> >>> Sent from my iPhone
> >>> Begin forwarded message:
> >>>> From: Swizzlr <me at swizzlr.co>
> >>>> Date: 21 January 2017 at 22:10:59 GMT
> >>>> To: swift-users <swift-users at swift.org>
> >>>> Subject: Announcement: Official Docker Image for Swift now available
> >>>> Hello all,
> >>>> I'm pleased to announce that with the assistance of many, many people
> (see below), we have released an “official" Docker image for Swift.
> >>>> The image contains everything needed to compile and run a Swift
> application, reliably and reproducibly. It’s based on Ubuntu 16.04 and has
> been used in production for many months now. A Docker library image such as
> this one occupies the top level namespace, so that you can simply write
> “FROM swift” to refer to the image. It has received extensive auditing for
> best practices and security by Docker experts, and will be maintained by a
> dedicated team of volunteers.
> >>>> I would like to encourage everyone interested to ask questions and
> offer improvements over on the Github repo. Personally, I want to offer my
> thanks to Haris Amin and Oliver Letterer for their early and pioneering
> work on Dockerizing Swift, Tianon Gravi for his patient and informative
> feedback while refining the image; and all those who have contributed to
> its development.
> >>>> Happy coding – I hope you make something excellent with this.
> >>>> Tom
> >>> _______________________________________________
> >>> swift-server-dev mailing list
> >>> swift-server-dev at swift.org
> >>> https://lists.swift.org/mailman/listinfo/swift-server-dev
> >> _______________________________________________
> >> swift-server-dev mailing list
> >> swift-server-dev at swift.org
> >> https://lists.swift.org/mailman/listinfo/swift-server-dev
> swift-server-dev mailing list
> swift-server-dev at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-server-dev