This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4357-deploying-server-side-swift-apps-with-docker
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4357-deploying-server-side-swift-apps-with-docker
I enjoyed your presentation (almost two years later) and I’m trying to follow along and getting errors. Is there an updated version of the files?
Thanks,
Chris
@chriscrossen What errors do you get exactly?
@shogunkaramazov I trashed the files. I’ll re-create it and post my results.
The first problem I ran into was running the Swift REPL from Docker:
Chriss-iMac:~ chriscrossen$ docker run --cap-add sys_ptrace -it swift bash
Unable to find image ‘swift:latest’ locally
latest: Pulling from library/swift
7b722c1070cd: Pull complete
5fbf74db61f1: Pull complete
ed41cb72e5c9: Pull complete
7ea47a67709e: Pull complete
391f9633b0ac: Pull complete
8b10bc3217d7: Pull complete
Digest: sha256:dd9004042a308eccdf1d6dc960b6ad3b3006c1062eb460d2e62001c35e21f518
Status: Downloaded newer image for swift:latest
root@8db4e59a4d15:/# swift --version
Swift version 4.2.2 (swift-4.2.2-RELEASE)
Target: x86_64-unknown-linux-gnu
root@8db4e59a4d15:/# swift
error: failed to launch REPL process: process launch failed: ‘A’ packet returned an error: 8
root@8db4e59a4d15:/#
I resolved this by using:
docker run --privileged -it swift bash
more in next reply
In trying to run the TIL app under Docker using:
docker build -t webapp .
I have a very long console log which I saved. The end of it is:
/usr/bin/ld.gold: error: cannot find -lCOpenSSL
. . . (many of these same lines)
/usr/bin/ld.gold: error: cannot find -lCOpenSSL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
:0: error: link command failed with exit code 1 (use -v to see invocation)
error: terminated(1): /usr/bin/swift-build-tool -f /var/www/til/.build/release.yaml main output:The command ‘/bin/sh -c swift build --configuration release’ returned a non-zero code: 1
@chriscrossen Do you still have issues with this?
It still does not work (as documented in my previous post), but I have given up on this and am working my way through the book ‘Server Side Swift with Kitura’.