I'm trying to start localstack in a containerized Jenkins build agent for unit testing. In other words, trying to start the localstack docker container from within a docker container. We do this all the time with other images, using the method of mounting `/var/run/docker.sock` in the "parent" container, but localstack will not start.

I get this error:

```
2019-11-08T18:53:53:ERROR:localstack.services.generic_proxy: Exception running proxy on port 8081: [Errno 13] Permission denied: '/tmp/localstack/server.test.pem' Traceback (most recent call last):
  File "/opt/code/localstack/localstack/services/generic_proxy.py", line 384, in run_cmd
    combined_file, cert_file_name, key_file_name = GenericProxy.create_ssl_cert(serial_number=self.port)
  File "/opt/code/localstack/localstack/services/generic_proxy.py", line 401, in create_ssl_cert
    return generate_ssl_cert(SERVER_CERT_PEM_FILE, serial_number=serial_number)
  File "/opt/code/localstack/localstack/utils/common.py", line 828, in generate_ssl_cert
    save_file(target_file, file_content)
  File "/opt/code/localstack/localstack/utils/common.py", line 642, in save_file
    with open(file, mode) as f:
PermissionError: [Errno 13] Permission denied: '/tmp/localstack/server.test.pem'
```

Port 8081 is not already in use, and `/tmp/localstack` is writable, so I don't understand why it's getting permission denied.
try:
                    if port == 53:
                        dnshost = '127.0.0.1' if host == 'localhost' else host
                        resolver = dns.resolver.Resolver()
                        resolver.nameservers = [dnshost]
                        resolver.timeout = 1
                        resolver.lifetime = 1
                        answers = resolver.query('google.com', 'A')
                        assert len(answers) > 0
                    else:
                        sock.sendto(bytes(), (host, port))
                        sock.recvfrom(1024)
                except Exception:
                    return False
            elif nw_protocol == socket.SOCK_STREAM:
                result = sock.connect_ex((host, port))
                if result != 0:
                    return False
    if 'tcp' not in protocols or not http_path:
        return True
    url = '%s://%s:%s%s' % (protocol, host, port, http_path)
    try:
        response = safe_requests.get(url)
        return not expect_success or response.status_code < 400
    except Exception:
        return False
def wait_for_port_open(port, http_path=None, expect_success=True, retries=10, sleep_time=0.5):
    """ Ping the given network port until it becomes available (for a given number of retries).
        If 'http_path' is set, make a GET request to this path and assert a non-error response. """
    def check():