Closed jernst closed 3 years ago
I really like the two-container idea for development.
I would be tempted to make a single training/sandbox image with the guestbook in it. Skip the cloning and the potential to miss the submodule step and jump right into the meat of it.
- To build and deploy, on the Mac, something like “bin/ubos-build-deploy”
I'm finding that I need to spend a bunch of time inside the container(s) to understand things. Maybe this isn't what you were implying by "on the Mac," but I wouldn't think it's worth it to build a lot of tools that help people avoid getting inside the container and messing around.
Turns out that Docker apparently has no good way of sharing a directory for read/write by a non-root user between the host and the container. Which practically means we cannot run makepkg
inside the container on code that is editable on the host where the developer's editor runs.
Apparently Microsoft, for that reason, implemented an entire NFS-like filesystem in Visual Studio that they then mount into the container. And also apparently, Docker Inc has recognized the problem and promises "Dev Environment" as part of Docker Desktop, but so far that has not been released.
I probably don't understand exactly what you're wanting, but I haven't had any trouble running makepkg within a subdirectory on my mounted volume:
https://github.com/decko-commons/decko-ubos/blob/master/Rakefile
On Thu, May 27, 2021 at 4:41 PM Johannes Ernst @.***> wrote:
Turns out that Docker apparently has no good way of sharing a directory for read/write by a non-root user between the host and the container. Which practically means we cannot run makepkg inside the container on code that is editable on the host where the developer's editor runs.
Apparently Microsoft, for that reason, implemented an entire NFS-like filesystem in Visual Studio that they then mount into the container. And also apparently, Docker Inc has recognized the problem and promises "Dev Environment" as part of Docker Desktop, but so far that has not been released.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/uboslinux/ubos-tools/issues/35#issuecomment-849927462, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAFLEHVTJEFMPKUKWTE2LDTP2VBBANCNFSM445JE5UA .
-- Ethan McCutchen Executive Director, Decko Commons Decko. You hold the cards.
Don't you get all the files owned by root? So you can't actually change them if you run makepkg
as shepherd? But then I think makepkg
doesn't like to run as root?
I'll pay more attention next time (should have a new decko release soon). But I definitely run makepkg as shepherd.
On Thu, May 27, 2021 at 11:38 PM Johannes Ernst @.***> wrote:
Don't you get all the files owned by root? So you can't actually change them if you run makepkg as shepherd? But then I think makepkg doesn't like to run as root?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/uboslinux/ubos-tools/issues/35#issuecomment-850087556, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAFLEGPM36AV5ZGLYYT3O3TP4F3PANCNFSM445JE5UA .
-- Ethan McCutchen Executive Director, Decko Commons Decko. You hold the cards.
Something like:
For a first-time, greenfield developer interested in a demo app, like the guestbook app:
Install Docker for Mac if needed
on the Mac, “git clone” an example app
on the Mac, “git submodule update” to pull in Mac-platform tools to make things easier
"docker-compose up” a two-container app. The containers will be:
To build and deploy, on the Mac, something like “bin/ubos-build-deploy”
Access web app at http://localhost:8080/
For real-world development:
instead of the git submodule thing, git clone the tools somewhere else, and put them into the $PATH on the Mac
ubos-app-template create —type php (or —rails or … )