v0.15.0 'delegated' mount feature for macOS breaks Fedora
Description
aws-sam-local (version 0.15.0) is attempting to mount the runtime container as :delegated on Fedora 28/29. This is a runtime error as the option is not supported on linux.
Steps to reproduce
install aws-sam-local on Fedora 28/29 and request any lambda.
Observed result
log output from sam includes the following mount request with the error. Fetching lambci/lambda:go1.x Docker container image....... 2019-04-25 15:07:36 Mounting /tmp/tmpbS7WDZ as /var/task:ro,delegated inside runtime container APIError: 500 Server Error: Internal Server Error ("invalid bind mount spec "/tmp/tmpbS7WDZ:/var/task:ro,delegated": invalid mode: ro,delegated")
Expected result
Similar to SAM CLI, version 0.14.2. which uses the following to mount the runtime container.
2019-04-25 14:43:39 Mounting /tmp/tmpNU1y10 as /var/task:ro inside runtime container
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: Fedora 28/29
sam --version: SAM CLI, version 0.15.0
@jeffblows Thanks for the report. What version of docker are you running?
I am using docker Docker version 1.13.1, build 1185cfd/1.13.1. Seems to be the default version packaged with both Fedora 28 and 29.
Rereading https://docs.docker.com/storage/bind-mounts/ it looks like delegated is only supported on dockerV17+. More upgrades :(
Docker is a dead package in Fedora, you should install moby-engine instead:
switch to podman-docker or moby-engine
https://src.fedoraproject.org/rpms/docker/blob/master/f/dead.package
Hey guys,
The same behavior on my local machine, below my configurations:
- Docker Community 18.09.6 (Server and Client)
- SO: Linux Ubuntu 18.04.2 LTS
- SAM version 0.15.0
This runtime container as delegated only happens with SAM CLI 0.15.0, running 0.14.2 the problem disappears.
Same here:
helles:sam-app> sam --version
SAM CLI, version 0.21.0
helles:sam-app> docker --version
Docker version 1.13.1, build 47e2230/1.13.1
helles:sam-app> cat /etc/redhat-release
Fedora release 30 (Thirty)
Hi, had the same issue with following tool versions
gerd~ docker --version
Docker version 1.13.1, build 47e2230/1.13.1
gerd~ sam --version
SAM CLI, version 0.22.0
gerd~ cat /etc/redhat-release
Fedora release 30 (Thirty)
Replacing docker shipped with Fedora by docker-ce from official repo solved this issue.
Now running:
gerd~ docker --version
Docker version 19.03.2, build 6a30dfc
gerd~ sam --version
cSAM CLI, version 0.22.0
gerd~ cat /etc/redhat-release
Fedora release 30 (Thirty)
....and could successfully run sample serverless app locally
The issue here is the docker version installed is out of date and does not support features that SAM CLI requires. See https://github.com/awslabs/aws-sam-cli/issues/1151#issuecomment-535480938 for solution.
Closing