question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

create .: volume name is too short, names should be at least two alphanumeric characters

See original GitHub issue

When I am trying to run function locally I got error form docker:

sam local invoke "HelloWorldFunction" -e index.js
2017/08/12 13:03:27 0.1.0
2017/08/12 13:03:27 Successfully parsed template.yaml (version 2010-09-09)
2017/08/12 13:03:27 Connected to Docker 1.30
2017/08/12 13:03:27 Fetching lambci/lambda:nodejs4.3 image for nodejs4.3 runtime...
nodejs4.3: Pulling from lambci/lambda
Digest: sha256:1ec74ee2e5c71e231d87d9b961f4f310bf817088f4391763a37e5adb657c6038
Status: Image is up to date for lambci/lambda:nodejs4.3
2017/08/12 13:03:30 Invoking index.handler (nodejs4.3)
2017/08/12 13:03:30 Could not invoke function: Error response from daemon: create .: volume name is too short, names should be at least two alphanumeric characters

Some info about my local system:

docker -v
Docker version 17.06.0-ce, build 02c1d87
docker-compose -v
docker-compose version 1.14.0, build c7bdf9e

OS

ProductName:	Mac OS X
ProductVersion:	10.12.6
BuildVersion:	16G29

pls let me know in case if you need more info

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
PaulMaddoxcommented, Aug 13, 2017

As a workaround, you can specify the full path to the template with --template $(pwd)/template.yaml

I need to dig further into why the absolute path isn’t being resolved. Im struggling to replicate this locally though. I know @ranman ran into this too.

2reactions
pavlodcommented, Aug 13, 2017

Hi @sanathkr

here is my task template its form awslabs/serverless-application-model repo.

AWSTemplateFormatVersion : '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: A hello world application.
Parameters:
  Bucket:
    Type: String
  CodeZipKey:
    Type: String
Resources:
  HelloWorldFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: index.handler
      Runtime: nodejs4.3
      CodeUri:
        Bucket: !Bucket
        Key: !CodeZipKey

Yes it is a totally a docker issue. But maybe ‘./’ can be used instead ‘.’ when mounting current dir to container.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker-compose: volume name is too short, names should be ...
Docker-compose: volume name is too short, names should be at least two alphanumeric characters · 2. Try replacing the relative ( ./ )...
Read more >
Docker-compose: volume name is too short, names should be ...
Coding example for the question Docker-compose: volume name is too short, names should be at least two alphanumeric characters-docker.
Read more >
docker volume create - Docker Documentation
Creates a new volume that containers can consume and store data in. If a name is not specified, Docker generates a random name....
Read more >
Docker compose install not working - The NewsBlur Forum
Some services didn't work due to the error Docker-compose: volume name is too short, names should be at least two alphanumeric characters ......
Read more >
ERROR: for build_env Cannot create container for service ...
ERROR: for build_env Cannot create container for service build_env: create .: volume name is too short, names should be at least two alphanumeric...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found