Kitura/swift-ubuntu-docker

Tagged Docker Images

choefele opened this issue · 6 comments

Thanks for providing a Docker image for Kitura-based apps. I was wondering if you could tag your Docker images so that developers can update their environment independently of Kitura releases.

For example, I used Kitura with swift-DEVELOPMENT-SNAPSHOT-2016-07-25-a for a while before I was able to upgrade to more recent versions of Swift. Meanwhile, the Docker image started using a newer version of Swift, which broke my Docker build referencing ibmcom/swift-ubuntu:latest.

My suggestion would be to tag the Docker images with the Swift version they are based on.

Hello, as of now, our goal is just to keep only one version of ibmcom/swift-ubuntu on Docker Hub. This image will support the latest release version of Swift 3.x (which as of now is Swift 3.0). It is not in our plans to maintain docker images for all the different development or preview Swift binaries.

Hence, when a new release version of Swift 3.x comes out, we will upgrade our Docker image accordingly.

I recommend you upgrade your application code to Swift 3.0 as soon as possible.

I assume the goal of ibmcom/swift-ubuntu is to provide a Kitura-based Swift environment (which is slightly different to a plain Swift environment because of required libraries). If so, I still see an advantage to tag the Docker images so it at least tracks the Kitura versions

@choefele - there are other Swift Docker images that are Kitura compatible:

https://hub.docker.com/r/smithmicro/swift/

These arebased on Ubuntu 1505 and supports all Swift releases from 0823 through 3.0 Production.

Hope this helps.

@dsperling Thanks, but this Docker image seems to be missing OpenSSL. I suppose this is needed by MongoKitten and I could add that in my Dockerfile

Step 9 : RUN swift test
 ---> Running in b7189be5c325
note: you may be able to install openssl using your system-packager:

    apt-get install openssl libssl-dev

note: you may be able to install openssl using your system-packager:

    apt-get install openssl libssl-dev

note: you may be able to install openssl using your system-packager:

    apt-get install openssl libssl-dev

note: you may be able to install openssl using your system-packager:

    apt-get install openssl libssl-dev

note: you may be able to install openssl using your system-packager:

    apt-get install openssl libssl-dev

note: you may be able to install openssl using your system-packager:

    apt-get install openssl libssl-dev

note: you may be able to install openssl using your system-packager:

    apt-get install openssl libssl-dev

note: you may be able to install openssl using your system-packager:

    apt-get install openssl libssl-dev

Compile CHTTPParser http_parser.c
Compile CHTTPParser utils.c
Compile CEnvironment env.c
Compile Swift Module 'SocksCore' (14 sources)
Compile Swift Module 'BSON' (20 sources)
Compile Swift Module 'LoggerAPI' (1 sources)
Compile Swift Module 'KituraTemplateEngine' (1 sources)
Compile Swift Module 'SwiftyJSON' (2 sources)
Compile Swift Module 'Socket' (3 sources)
Linking CEnvironment
Linking CHTTPParser
Compile Swift Module 'Environment' (1 sources)
Compile Swift Module 'HeliumLogger' (1 sources)
Compile Swift Module 'Socks' (5 sources)
Compile Swift Module 'SSLService' (1 sources)
Compile Swift Module 'MongoCryptoEssentials' (22 sources)
/app/Packages/OpenSSL-0.2.2/module.modulemap:18:15: error: header '/usr/include/openssl/conf.h' not found
       header "/usr/include/openssl/conf.h"
              ^
/app/Packages/SSLService-0.11.24/Sources/SSLService.swift:26:9: error: could not build Objective-C module 'OpenSSL'
        import OpenSSL
               ^
<unknown>:0: error: build had 1 command failures
swift-test: error: exit(1): /usr/bin/swift-build-tool -f /app/.build/debug.yaml test
ERROR: Service 'app' failed to build: The command '/bin/sh -c swift test' returned a non-zero code: 1

@choefele - this was intentional in order to keep the image as small as possible. Only packages required for Kitura were added. If you have other comments or suggestions maybe we should move this conversation over to the other project.

@choefele I am closing this issue since as of now we don’t plan to keep multiple versions of this docker images; instead our goal is just to keep only one version of it, which should support the latest release version of Swift 3.x (which as of now is Swift 3.0). When a new release version of Swift 3.x comes out, we will upgrade this image accordingly. I recommend you upgrade your application code to Swift 3.0.