-
Notifications
You must be signed in to change notification settings - Fork 29
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
Deploy Script not Working in Linux Environment #106
Comments
I have the same issue The short version: the containers user doesn't have permission to access Long version: |
This is not expected. The cookiecutter is written to work on Linux as far as I can tell... mostly because we encourage GitHub Actions which is a Linux host. I just did a test with the latest and it all worked. See here for details. https://github.com/metaskills/lambytest42/actions/runs/1020165380 Since this issue was created I did do a small change to the cookiecutter. Basically leveraging the SAM docker tag on the development/test/build image. This should not make a difference, but I did want to share. https://github.com/metaskills/lambytest42/actions/runs/1020165380 Can you create a test project from the latest cookiecutter and verify it works or does not? If it does not, what could be happening that deploy works for GitHub Ubuntu latest Linux vs others? |
Is it possible this issue is fixed via this comment? #100 (comment) |
I managed the issue changing the HOST_GID in the bootstrap script to store my system's Docker group identifier. Now I can to use the socket /var/run/docker.sock inside the container and run deploy script from my local environment. |
I also had success with changing the HOST_GID and HOST_UID. I changed the bootstrap script to also include to check for "Linux" in the if statement that sets HOST_GID and HOST_UID to 0.
@metaskills This makes me wonder if we should change this indefinite without the if statement. Darwin is the MacOS I'm running it is working, and could this work for all other OS? Will this break in Github's Linux or Windows? |
@Digoss Could you share your bootstrap script file? I would like to know how are you setting your system's Docker group identifier |
I got the GID using the command The build command looks like this:
Currently the image |
Getting kind of hard to write good cross compatible Docker code. I've been playing a lot with GitHub Codespaces and think I may have found an easier pattern for the dev container stuff we have been pushing. Some details here: |
I recently refactored the Lamby Cookiecutter to simplify a great many things. Should help, especially the devcontainer stuff. Review here: Let me know if you have any questions. Docs coming soon on the new site. |
I've been having success deploying just fine with the ./bin/deploy script in my Mac with docker and SAM Cli installed. However, I wanted to create a development environment in AWS Cloud 9 and all the scripts run fine for the exception of the deploy script. I started with the ./bin/bootstrap, then I did ./bin/setup and finally ./bin/deploy. The error that shows up is asking if docker is running when the step of running SAM build. I first try running this in an Ubuntu instance, but after a few failed tries I tried using Amazon Linux 2 instance on my cloud 9. Both OS failed the same way with the same error. I think the issue is that the deploy script runs SAM build that creates a docker image, but cannot find docker. I do not understand why is it working fine in the MacBook and I also had a coworker test these applications deploy in his Macbook and it works also (both computers are running different version of MacOS), but it only fails on a Linux instance (I did not try on a Windows).
I tried deleting the container by running
docker system prune -a
and running the ./bin/bootstrap script again and the same errors show.Have you guys tested the Lamby cookie cutter applications in a Linux environment? Any ideas on what might be happening?
The text was updated successfully, but these errors were encountered: