title: AWS EC2 Failed to execute script docker-compose
body: <p>I can run my app with <code>sudo docker-compose up</code>  but when I just do <code>docker-compose up</code> I get</p>
  <pre><code>$ docker-compose up
  Traceback (most recent call last):
    File &quot;urllib3/connectionpool.py&quot;, line 670, in urlopen
    File &quot;urllib3/connectionpool.py&quot;, line 392, in _make_request
    File &quot;http/client.py&quot;, line 1255, in request
    File &quot;http/client.py&quot;, line 1301, in _send_request
    File &quot;http/client.py&quot;, line 1250, in endheaders
    File &quot;http/client.py&quot;, line 1010, in _send_output
    File &quot;http/client.py&quot;, line 950, in send
    File &quot;docker/transport/unixconn.py&quot;, line 43, in connect
  PermissionError: [Errno 13] Permission denied
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;requests/adapters.py&quot;, line 439, in send
    File &quot;urllib3/connectionpool.py&quot;, line 726, in urlopen
    File &quot;urllib3/util/retry.py&quot;, line 410, in increment
    File &quot;urllib3/packages/six.py&quot;, line 734, in reraise
    File &quot;urllib3/connectionpool.py&quot;, line 670, in urlopen
    File &quot;urllib3/connectionpool.py&quot;, line 392, in _make_request
    File &quot;http/client.py&quot;, line 1255, in request
    File &quot;http/client.py&quot;, line 1301, in _send_request
    File &quot;http/client.py&quot;, line 1250, in endheaders
    File &quot;http/client.py&quot;, line 1010, in _send_output
    File &quot;http/client.py&quot;, line 950, in send
    File &quot;docker/transport/unixconn.py&quot;, line 43, in connect
  urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;docker/api/client.py&quot;, line 214, in _retrieve_server_version
    File &quot;docker/api/daemon.py&quot;, line 181, in version
    File &quot;docker/utils/decorators.py&quot;, line 46, in inner
    File &quot;docker/api/client.py&quot;, line 237, in _get
    File &quot;requests/sessions.py&quot;, line 543, in get
    File &quot;requests/sessions.py&quot;, line 530, in request
    File &quot;requests/sessions.py&quot;, line 643, in send
    File &quot;requests/adapters.py&quot;, line 498, in send
  requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;docker-compose&quot;, line 3, in &lt;module&gt;
    File &quot;compose/cli/main.py&quot;, line 80, in main
    File &quot;compose/cli/main.py&quot;, line 189, in perform_command
    File &quot;compose/cli/command.py&quot;, line 60, in project_from_options
    File &quot;compose/cli/command.py&quot;, line 152, in get_project
    File &quot;compose/cli/docker_client.py&quot;, line 41, in get_client
    File &quot;compose/cli/docker_client.py&quot;, line 170, in docker_client
    File &quot;docker/api/client.py&quot;, line 197, in __init__
    File &quot;docker/api/client.py&quot;, line 221, in _retrieve_server_version
  docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
  [48420] Failed to execute script docker-compose
  </code></pre>
  <p>This is my Docker file</p>
  <pre><code>FROM golang:alpine AS builder
  
  ENV GO111MODULE=on
  RUN mkdir /app
  ADD . /app/
  WORKDIR /app
  COPY ./data.go .
  COPY ./handlers.go .
  COPY ./main.go .
  COPY ./static /static
  COPY ./ssl /ssl
  COPY ./views /views
  RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build $(ls -1 *.go)
  RUN useradd -u ubuntu
  USER ubuntu
  EXPOSE 3000
  CMD [&quot;go&quot;, &quot;run&quot;, &quot;.&quot;]
  </code></pre>