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

ER: Devs running WSL Ubuntu cannot run docker-compose up #5647

Closed
2 of 5 tasks
roslynwythe opened this issue Oct 2, 2023 · 18 comments
Closed
2 of 5 tasks

ER: Devs running WSL Ubuntu cannot run docker-compose up #5647

roslynwythe opened this issue Oct 2, 2023 · 18 comments
Assignees
Labels
Complexity: See issue making label See the Issue Making label to understand the issue writing difficulty level Complexity: Small Take this type of issues after the successful merge of your second good first issue ER Emergent Request Feature: Onboarding/Contributing.md Issue Making: Level 2 Make issue(s) from an ER or Epic ready for issue making role: back end/devOps Tasks for back-end developers size: 1pt Can be done in 4-6 hours

Comments

@roslynwythe
Copy link
Member

roslynwythe commented Oct 2, 2023

See comment below #5647 (comment) for instructions for how to resolve ER

Emergent Requirement - Problem

Several new devs running WSL Ubuntu have been blocked by permission errors when running docker-compose up

Issue you discovered this emergent requirement in

see Slack thread copied into #5647 (comment)

Did you have to do something temporarily

  • YES - we have to keep fielding slack messages
  • NO

Who was involved

@freaky4wrld @jaasonw @klei0229 Matt Pereira

What happens if this is not addressed

Potential contributors may become frustrated and quit Hack for LA

Resources

see comment by @klei0229 #5219 (comment)
see #5647 (comment)
also see other comments in this issue

Recommended Action Items

  • Make a new issue
  • Discuss with team
  • Let a Team Lead know

Potential solutions [draft]

Create an issue to add to the contributing.md file with instructions for how to find your version of Go.

Fang says here #5647 (comment) Anything less than 1.20 has a problem.

@roslynwythe roslynwythe added Feature Missing This label means that the issue needs to be linked to a precise feature label. role missing size: 0.25pt Can be done in 0.5 to 1.5 hours labels Oct 2, 2023
@github-actions

This comment was marked as outdated.

@roslynwythe roslynwythe self-assigned this Oct 2, 2023
@roslynwythe roslynwythe added Complexity: Medium Feature: Onboarding/Contributing.md role: back end/devOps Tasks for back-end developers size: 1pt Can be done in 4-6 hours Complexity: Small Take this type of issues after the successful merge of your second good first issue and removed role missing size: 0.25pt Can be done in 0.5 to 1.5 hours Complexity: Medium labels Oct 2, 2023
@roslynwythe roslynwythe changed the title ER: Devs running WSL Unbuntu have permission denied errors running docker ER: Devs running WSL Unbuntu get permission denied errors running docker Oct 2, 2023
@freaky4wrld
Copy link
Member

freaky4wrld commented Oct 3, 2023

Maybe the situation might differ as the above mentioned solution is not perfect @klei0229 was able to resolve using this approach, and for me it's different like the issue that I have seen is my host machine UID: 1000 but for my Docker Container it's 0. I'm still stuck with this issue and trying to find out the solution to run the site locally.

My Docker Container's UID

Screenshot from 2023-10-03 14-24-44

My host machine UID

Screenshot from 2023-10-03 14-27-04

@roslynwythe roslynwythe changed the title ER: Devs running WSL Unbuntu get permission denied errors running docker ER: Devs running WSL Unbuntu cannot run docker-compose up Oct 3, 2023
@jaasonw jaasonw changed the title ER: Devs running WSL Unbuntu cannot run docker-compose up ER: Devs running WSL Ubuntu cannot run docker-compose up Oct 3, 2023
@roslynwythe roslynwythe added ready for product Complexity: Medium and removed Feature Missing This label means that the issue needs to be linked to a precise feature label. Complexity: Small Take this type of issues after the successful merge of your second good first issue labels Oct 5, 2023
@ExperimentsInHonesty

This comment was marked as outdated.

@ExperimentsInHonesty ExperimentsInHonesty added ready for dev lead Issues that tech leads or merge team members need to follow up on and removed ready for product labels Nov 6, 2023
@ExperimentsInHonesty ExperimentsInHonesty added this to the 08. Team workflow milestone Nov 6, 2023
@roslynwythe
Copy link
Member Author

The original Slack thread:

Freaky Wrld
I've been trying to complete my prework checklist and got stuck while hosting the site locally through docker can anybody point out to me where to look for solution...... refer the below screenshot, my current working directory is website, I'm trying to execute the docker-compose up command and the Docker Desktop is running...... what I'm doing wrong here, I looked up here for the solution, but it turned out my current UID is already 1000, but still I tried to provide the environment variables in the docker-compose.yml file, and found that's not working either.
4 files

Screenshot from 2023-09-29 13-50-03.png

Screenshot from 2023-09-29 13-50-03

Screenshot from 2023-09-29 14-02-32.png

Screenshot from 2023-09-29 14-02-32

Screenshot from 2023-09-29 14-05-44.png

Screenshot from 2023-09-29 14-05-44

Screenshot from 2023-09-29 14-06-27.png
Screenshot from 2023-09-29 14-06-27

Stack OverflowStack Overflow
Unable to build cloned Jekyll site - jekyll 3.8.5 | Error: Permission denied @ dir_s_mkdir - /srv/jekyll/_site

Freaky Wrld
1 month ago
Btw I'm on Ubuntu 22.04.3

Fang
1 month ago
Do you have docker installed as rootless?

Fang
1 month ago
The image sets up a non-root user to run the server and docker rootless config doesn’t support that.

Fang
1 month ago
Either use podman for rootless or run docker server as root.

Fang
1 month ago
I’m running my docker daemon rootless so I’m aware of the issue. (edited)

Freaky Wrld
1 month ago
I don't have any knowledge about docker, installed it following the documentation

Fang
1 month ago
Oh, then it’s probably a different issue.

Roslyn Wythe
1 month ago
@Fang
I'm curious why do you run docker daemon rootless?

Fang
1 month ago
@Roslyn Wythe
Seems like I'm the only one here that does this so maybe it's not that important to do or it's not yet standard practice. I think it's pretty safe for the website team's ghpages docker image to run on a docker daemon running as root. But here's the motivation for running it rootless, but actual usage can be complicated depending on the image being used.
It’s supposedly safer for running docker containers, because it's possible for a compromised container to compromise the host machine running docker as root. Docker has protections against that (seccomp filters out admin-level syscalls, AppArmor does something too) but running the whole thing as a limited user is a more certain guarantee. Here's the explanation for it from an organization dedicated to web security. Here's docker's docs on security with a page on rootless docker.
But here's the problem with rootless: Docker's rootless mode only supports running as root inside the container because that's what it assumes. It has issues with file permissions when running containers as a non-root user (rootless image) like the ghpage image the website team uses does. The rootless image is a safety measure to limit the chances of running something in the container that will compromise the host running a rootful docker daemon. So I think it's still pretty safe to run the ghpages image with a rootful docker daemon.
It's confusing because the rootless daemon doesn't support rootless images, so you have to choose one or the other. Some software provide docker images that run as root and non-root, which is a way to satisfy both camps.
It's enough hassle to run security-minded images that at some point I'm planning to switch back to the rootful docker daemon if podman doesn't work well. Podman is supposed to be a drop-in replacement for docker to run docker containers, only it's daemon-less and has better user-mapping support than docker. It should work according to this comment.

@roslynwythe

This comment was marked as resolved.

@roslynwythe
Copy link
Member Author

Thank you @fyliu. I'll try to locate other Hfla developers who are experiencing this problem, to see if upgrading the Ubuntu docker client resolves the problem.

@ExperimentsInHonesty
Copy link
Member

ExperimentsInHonesty commented Mar 1, 2024

This ER will be resolved when someone makes an issue to add to the contributing.md file with instructions for how to find your version of Go

Fang says here #5647 (comment) Anything less than 1.20 has a problem.

@ExperimentsInHonesty ExperimentsInHonesty added Complexity: Small Take this type of issues after the successful merge of your second good first issue and removed Complexity: Medium labels Mar 31, 2024
@ExperimentsInHonesty ExperimentsInHonesty added the Draft Issue is still in the process of being created label Jun 4, 2024
@k-cardon k-cardon self-assigned this Oct 25, 2024
@HackforLABot
Copy link
Contributor

Hi @k-cardon, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:-
i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?)
ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

@k-cardon k-cardon removed their assignment Oct 25, 2024
@roslynwythe
Copy link
Member Author

@ExperimentsInHonesty @k-cardon is interested in this issue. She has been waiting for a level 2 issue writing issue for good first issue but there are none of those so I thought this one would be a good choice for her.

@roslynwythe roslynwythe removed the Draft Issue is still in the process of being created label Oct 25, 2024
@HackforLABot
Copy link
Contributor

Hi @k-cardon, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:-
i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?)
ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

@k-cardon
Copy link
Member

Availability: usually evenings / weekends / Tuesday afternoons

ETA: within one week

@k-cardon
Copy link
Member

@roslynwythe just an update that @ExperimentsInHonesty gave permission for me to work on this one!

@k-cardon k-cardon moved this from Emergent Requests to In progress (actively working) in P: HfLA Website: Project Board Oct 27, 2024
@k-cardon k-cardon moved this from In progress (actively working) to Questions / In Review in P: HfLA Website: Project Board Oct 28, 2024
@k-cardon
Copy link
Member

k-cardon commented Oct 28, 2024

I made the issue from this ER and it is ready for review:

@k-cardon k-cardon added the ready for merge team needs a senior review either to do some re writing or to approve it for ready for prioritization label Oct 28, 2024
@ExperimentsInHonesty ExperimentsInHonesty removed Ready for Prioritization ready for merge team needs a senior review either to do some re writing or to approve it for ready for prioritization labels Oct 30, 2024
@ExperimentsInHonesty
Copy link
Member

ExperimentsInHonesty commented Oct 30, 2024

@k-cardon Thank you for working on this. Your issue has been approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: See issue making label See the Issue Making label to understand the issue writing difficulty level Complexity: Small Take this type of issues after the successful merge of your second good first issue ER Emergent Request Feature: Onboarding/Contributing.md Issue Making: Level 2 Make issue(s) from an ER or Epic ready for issue making role: back end/devOps Tasks for back-end developers size: 1pt Can be done in 4-6 hours
Projects
Development

No branches or pull requests

6 participants