Error trying to run Swift REPL

(Chris Crossen) #1

I followed the instructions to run a Swift REPL in docker:
$ docker run --cap-add sys_ptrace -it --rm swift swift

I get the following:
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
error: failed to launch REPL process: process launch failed: 'A' packet returned an error: 8

I tried this on two version of macOS and Ubuntu 16.04 and get the same result.
Do I have something wrong or missing from the docker run command?


(Marc Rasi) #2

Are you following these instructions:

You could try docker run --privileged -it --rm swift swift, which gives swift even more privileges.

Perhaps something changed recently that makes the REPL use more privileges. I think I remember that it has worked with just --cap-add sys_ptrace in the past.

(Chris Crossen) #3

Thanks @marcrasi, that (docker run --privileged -it --rm swift swift) did the trick. Looks like the instructions at need to be updated.