OpenPGP / openpgp.org

OpenPGP.org website
https://www.openpgp.org
294 stars 112 forks source link

Add Dockerfile #132

Closed andrewgdotcom closed 4 months ago

teythoon commented 4 months ago

Building the image fails for me with:

Step 15/16 : COPY _* /site
When using COPY with more than one source file, the destination must be a directory and end with a /

After adding the / it succeeds and works.

It is kinda sad to lose the automatic regeneration though. Given that we need to instruct the user to do the port forwarding, we could also bind-mount the site source into the container. I haven't tried, but I think that should work and also cut down on the creation of many dangling images.

andrewgdotcom commented 4 months ago

yes, but if you bind mount the source into the container, the container overwrites the Gemfile in the source (or can't build, if you mount read only). The only way to do it correctly is either a) mount every subdirectory of the top directory individually or b) mount an overlay directory over the top of the source to catch the modifications. I don't like either of those options... :-(

andrewgdotcom commented 4 months ago

or c) restructure the source so that all the contents are under a single subdirectory, that way we can just mount that directory (and cleanly omit Gemfile, vendor etc.)

teythoon commented 4 months ago

c) sounds best indeed.

andrewgdotcom commented 4 months ago

Can we do that some other time? ;-)

teythoon commented 4 months ago

Absolutely, let's merge and iterate.