Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: bindings not correctly set in docker #670

Closed
ivotron opened this issue Jun 3, 2019 · 6 comments
Closed

cli: bindings not correctly set in docker #670

ivotron opened this issue Jun 3, 2019 · 6 comments

Comments

@ivotron
Copy link
Collaborator

ivotron commented Jun 3, 2019

building an action that uses docker internally results in:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
ERROR: Action 'docker build' failed!
@ivotron ivotron added the bug label Jun 3, 2019
@ivotron ivotron closed this as completed in d948cdd Jun 4, 2019
@ivotron ivotron reopened this Jun 4, 2019
@ivotron ivotron closed this as completed in 2dc9aff Jun 4, 2019
@ivotron
Copy link
Collaborator Author

ivotron commented Jun 6, 2019

Running an action that bind-mounts folders (e.g. an action using docker-compose) fails. We need to rework the way we configure the bindings a bit differently:

  • bind $HOME:$HOME and $HOME:/github/home
  • define $HOME variable with $HOME as its value
  • bind $PWD:$PWD and $PWD:/github/workspace
  • define $GITHUB_WORKSPACE variable with $PWD as its value

the above supports both (1) actions that need to bind-mount the workspace (or home folder) in another container (by referring to it as $HOME or $GITHUB_WORKSPACE); and (2) we create the actual paths for /github/workspace and /github/home.

For this, we need to figure out a way to specify this using docker-py

@ivotron ivotron reopened this Jun 6, 2019
ivotron added a commit that referenced this issue Jun 6, 2019
ivotron added a commit that referenced this issue Jun 6, 2019
Goes back to the way we were binding folders before.

issue #670
@ivotron ivotron removed the bug label Jun 6, 2019
@JayjeetAtGithub
Copy link
Collaborator

JayjeetAtGithub commented Jun 21, 2019

bind $HOME:$HOME and $HOME:/github/home

@ivotron Does this mean that 2 directories $HOME and /github/home on the container will be mounted to $HOME on the host?

Like here

docker run -v $HOME:$HOME -v $HOME:/github/home alpine:3.9 ls /github/home`

@ivotron
Copy link
Collaborator Author

ivotron commented Jun 21, 2019

yes

@JayjeetAtGithub
Copy link
Collaborator

@ivotron Sorry, forgot onething, can you tell me how to reproduce the error ?

@ivotron
Copy link
Collaborator Author

ivotron commented Jun 21, 2019

with the change in 40d1abf, we don't experiment errors now. The main issue is that /github/home and /github/workspace are not currently available inside containers. We need to figure out how to bindmount them using docker-py

@JayjeetAtGithub
Copy link
Collaborator

@ivotron Thanks

@ivotron ivotron closed this as completed in b44a9a2 Jul 3, 2019
ivotron added a commit that referenced this issue May 24, 2020
ivotron added a commit that referenced this issue May 24, 2020
ivotron added a commit that referenced this issue May 24, 2020
Goes back to the way we were binding folders before.

issue #670
ivotron pushed a commit that referenced this issue May 24, 2020
fixes #697 - adds a --runtime flag that allows to provide 'singularity' or 'docker' (default). When singularity is given, the workflow is executed in singularity containers.

fixes #670 - correctly configures the bindings for HOME and Github Workflow environment variables

fixes #678 - changes the implementation of '--parallel' so that it uses a process pool instead of a thread one.
ivotron added a commit that referenced this issue May 25, 2020
ivotron added a commit that referenced this issue May 25, 2020
ivotron added a commit that referenced this issue May 25, 2020
Goes back to the way we were binding folders before.

issue #670
ivotron pushed a commit that referenced this issue May 25, 2020
fixes #697 - adds a --runtime flag that allows to provide 'singularity' or 'docker' (default). When singularity is given, the workflow is executed in singularity containers.

fixes #670 - correctly configures the bindings for HOME and Github Workflow environment variables

fixes #678 - changes the implementation of '--parallel' so that it uses a process pool instead of a thread one.
ivotron added a commit that referenced this issue May 25, 2020
ivotron added a commit that referenced this issue May 25, 2020
ivotron added a commit that referenced this issue May 25, 2020
Goes back to the way we were binding folders before.

issue #670
ivotron pushed a commit that referenced this issue May 25, 2020
fixes #697 - adds a --runtime flag that allows to provide 'singularity' or 'docker' (default). When singularity is given, the workflow is executed in singularity containers.

fixes #670 - correctly configures the bindings for HOME and Github Workflow environment variables

fixes #678 - changes the implementation of '--parallel' so that it uses a process pool instead of a thread one.
ivotron added a commit that referenced this issue May 25, 2020
ivotron added a commit that referenced this issue May 25, 2020
ivotron added a commit that referenced this issue May 25, 2020
Goes back to the way we were binding folders before.

issue #670
ivotron pushed a commit that referenced this issue May 25, 2020
fixes #697 - adds a --runtime flag that allows to provide 'singularity' or 'docker' (default). When singularity is given, the workflow is executed in singularity containers.

fixes #670 - correctly configures the bindings for HOME and Github Workflow environment variables

fixes #678 - changes the implementation of '--parallel' so that it uses a process pool instead of a thread one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants