-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use official Swift Docker image #143
Comments
thank for bringing this up, couple of things to discuss here
|
Of course it doesn't (well, it kinda does, because this is what people are going to use). |
I think there are a number of problems with using that particular Docker image. As @tomerd points out, it's Ubuntu 16.04 only, which is a shame as Swift supports Ubuntu 14.04, 16.04, and 16.10. I think SwiftNIO should support all the levels of Ubuntu that Swift does, for maximum compatibility and adoption. It is also x86 only. We all hope NIO has a big future on other platforms, whether that is Raspberry Pi or IBM Z. To make that happen we want a multi-arch Docker image that can be used as part of expanded CI for testing across platforms and architectures. (The IBM 16.04 images are multi-arch and support both x86 and s390x, but I'm not suggesting that SwiftNIO should use the IBM images. We scratched our own itch but Swift deserves a comprehensive set of official Docker images). I don't see what the images at https://hub.docker.com/_/swift/ offer beyond an "official" tag. |
I think I technically agree with all of what you two are saying. Actually I can even extend that: the thing I dislike a lot about the official image is that it doesn't distinguish between runtime environment and development environment (to the degree that I wouldn't personally use it for deployment 😬). I specifically don't want clang, SPM etc in an image I deploy to the cloud, i.e. in an NIO server setup. For sizing reasons and even more so for security reasons. At the same time I think it is the wrong approach to brew own solutions. If IBM isn't happy w/ the official image, I'm 100% sure that they would love a lot of PRs from IBM. (and I think we all know why this didn't happen and is unlikely going to happen ;-) )
Well, the "official" tag is A LOT. It means that this is what people go for when they shop around (and quite likely already have on their system). Which is a good thing, because it means a good baseline for everyone! If it isn't good enough, please just contribute to it instead of making another branch which is different! If NIO needs something extra, they can layer on top, thats the whole idea of layered images ;-)
Oh common 😀 Neither Raspi nor S/390 are official Swift.org platforms. I understand that IBM wants to sell its big iron and that is perfectly legit, but please don't bring it into such a discussion. It doesn't belong here. You just support S/390 extra, you don't support Raspi nor SPARC or MIPS. People have to turn to my images for this, to place my own advertising here: https://hub.docker.com/r/helje5/rpi-swift/ ;-) OK. In summary I think I understand that the official image doesn't work here (yet, hopefully later), so I guess I'm OK w/ closing this issue. After all, this is about NIO, not about Swift Docker images. Putting the focus back on that, you - as the NIO project - still want that contributors run tests etc on Linux before submitting PRs. The current Docker process is too fragile/time-consuming/unpleasing for that and a consistent base image on Hub would definitely make that much more reasonable. |
+1 |
personally i tend to agree but i'd like to see what the rest of the @apple/swift-nio-members think and also what @ddunbar thinks about us publishing such image, given that this is an apple project |
I think the fragmented state of Docker for Swift is clear from this thread. It's not something NIO can solve, it needs the combined efforts of interested parties, coordinated from swift.org and with the blessing of the Swift core team. |
As mentioned - as far as I know (and as always there is a chance I remember it wrong) - the Swift DockerHub image in fact has the blessing of the Swift core team. They did not just declare themselves as "official", it was a coordinated effort. It is the "others" who fragmented instead of contributing. It is too long ago, but I'm certain that this was discussed on swift-users maybe 2 years ago or so. multi-archAs good as it sounds, you really don't need multi-arch Docker images if Swift is not multi-arch in the first place ;-) The only thing the Swift core team supports is 3 versions of x86-Ubuntu plus macOS (https://swift.org/download/). For example Swift 4 doesn't work properly on Raspi yet, which is a shame.
Well, at least in the way you expect it to be true: That the image works on Raspi or xyz. It just means s390 + x86 Ubuntu. (seriously, no offence, but calling Swift multi-arch is just wrong in the first place) |
Sorry. I'm trying to be constructive and suggest a way forward but things seem to become a bit confrontational 🙁 |
I'm sure no one wants unhappy faces over here 🙂 I also think that everyone tries to be constructive. By any means the discussion really doesn't belong here. Maybe you want to re-raise the Docker topic on some Swift.org forum group. I think the way forward is what I said above:
Maybe @tomerd can figure out whether they can publish a custom base image for NIO testing (or maybe even contribute to the official one, which would be even better). |
we should do this. CC @tomerd |
yes! |
Expected behavior
Swift NIO reuses the official Swift Docker image instead of brewing its own soup.
Actual behavior
The Swift NIO Docker builds its own environment, with all the dependencies etc.
Steps to reproduce
docker build
First of all, people w/ Docker on the Mac, quite likely already have the image downloaded and can get started quicker.
Second, you use a consistent environment for Setty which other people already use. You'll catch issues you may not be seeing.
I don't know if you need anything extra to what the official image provides. If not, it would also result in a reproducible build/test environment. (If yes, you may want to push an own repo based on swift:4.0.3).
You can find it over here, it even says "OFFICIAL REPOSITORY" 😁: https://hub.docker.com/_/swift/
The text was updated successfully, but these errors were encountered: