Skip to content

Conversation

@LuminousHustler
Copy link

Fixes # N/A

Changes Summary

  • docker-compose command was incorrect
  • docker-compose also needs to be run with sudo permissions
  • It wasn't obvious to me that docker and docker-compose needed to be installed separately on the workstation. I thought I'd break that out, small quality of life improvement

This pull request [ is ] ready for review.

@LuminousHustler
Copy link
Author

@danirabbit lmk if I should take another pass at this. My 'hello world' equivalent PR before I attempt to tackle #3742

Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better for someone in @elementary/web-developers to review than me! I couldn’t get the docker method working properly and I think neither could @RMcNeely 😅

```
cd ./dev && docker compose up -d
cd ./dev
sudo docker-compose up
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the recommendation when installing docker is to add your user to the docker group so that you're not running containers as root

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m also not sure what the -d flag was for so I’m hesitant to approve removing it unless someone else knows

Copy link
Collaborator

@kgrubb kgrubb Dec 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's for detached mode. It makes the compose environment run in the background instead of requiring an active tty. I'd think we would still want it to detach.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I would leave it without sudo, if you really want maybe add a note about needing to have docker set up.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realize that adding the user to the docker group would omit the need for running the container as root. I'll definitely take another stab at this PR and remove sudo. I never questioned it until you mentioned it, and a quick google shows that apparently I have been doing docker wrong for years!

Would it be cool if I added a reference/footnote or something that linked to the docker docs https://docs.docker.com/engine/install/linux-postinstall/

...unless that seems like too much hand-holding ofc. Personally I'd have found that useful to know back in the day, but here we are :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm always pro footnotes 👍

Copy link
Contributor

@RMcNeely RMcNeely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we edit line 7 to either include the entire stack in docker or remove PHP?

```
cd ./dev && docker compose up -d
cd ./dev
sudo docker-compose up
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I would leave it without sudo, if you really want maybe add a note about needing to have docker set up.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants