Skip to content

'docker-volume-basedir' option for 'sam build' command #963

Open

Description

@bryanburke

Describe your idea/feature/enhancement

Currently, sam build --use-container does not work when using a remote Docker host (e.g., like the one in this guide), even though the project directory exists on the remote machine. Unlike sam local, the sam build command has no docker-volume-basedir option and does not respect the SAM_DOCKER_VOLUME_BASEDIR environment variable. Furthermore, the base-dir option does not behave like docker-volume-basedir, as sam build makes the assumption that base-dir is on the local machine.

Proposal

Add the docker-volume-basedir option to the sam build command and have ApplicationBuilder treat it just like InvokeContext does (no path conversion or resolution).

Things to consider:

  1. Will this require any updates to the SAM Spec No

Additional Details

Due to the advanced nature of this setup, some notes would need to be added to the documentation explicitly warning users that the project directory must exist on the remote host at the path specified by docker-volume-basedir.

Activity

  1. added
    area/build
    type/feature
    on Apr 23, 2019
  2. acolombier commented on May 17, 2019

    @acolombier

    Hi @bryanburke , we are facing the same issue. Did you find any temporary workaround, or worked on a patch perhaps ?

  3. cosmincatalin commented on Oct 3, 2019

    @cosmincatalin

    Same here. It's impossible to use a CI/CD tool runs build with containers.

  4. koenverwimp commented on Oct 14, 2019

    @koenverwimp

    We run into the same problem and also got stuck with CI/CD running in containers.
    Any progress on this?

  5. gorisjurgen commented on Oct 14, 2019

    @gorisjurgen

    We are also running into the same problem with our CI/CD running in containers.

  6. vleandersson commented on Mar 3, 2021

    @vleandersson

    👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions