Category: Possibly useful
-
Fancier Website in a Docker Container
The previous post went over how to bundle a static website into a Docker container. That’s a neat little trick – keeping the entire website and making it trivial to install on a VPS behind Nginx Proxy Manager. It worked great for most of my little websites. But… A couple of my websites had very…
-
Website in a Docker Container
Having figured out how to use the GitHub package registry, I was a bit inspired by this blog post from Florin Lipan to deliver all my little static websites as Docker containers. I’m not as focused as he is about making them tiny, but I did steal the idea of using BusyBox httpd for serving…
-
rsync between Synology NAS
A while ago, I devised a complicated system where I could drop files in a web interface running on an LXD container and the files would then magically appear in a directory on a remote NAS in the morning. It turned out to not be very robust, and I gave up on it after a…
-
Containerised NGINX Proxy Manager & the 502 error
If you’re used to running NGINX Proxy Manager in front of your web apps, and switch to running it in a container, you’re going to need to learn a little about Docker networks to get everything connected. If you just do your regular setup, and direct the proxy for an address to 127.0.0.1:<some port>, it…
-
dockerfile – CMD vs ENTRYPOINT
There are two entries we often have at the end of a dockerfile (which is the file that tells Docker how an image is to be built). They are similar in that when the container is launched from an image, these commands will be executed. For example, both of the dockerfiles below will print “Hello…
-
User environment variables are not available in cron
I’m used to using the docker-compose.yaml or dockerfile to set environment variables for containers running my apps, but ran into an issue recently where the variable seemed to be set some of the time, but at others it didn’t appear to exist. I had a script set to run by cron inside the container, and…
-
Outputting to the console, in Docker, from a cron job
If you’re googling this exact title, you’re probably bumping your head against the same things I was today. I was debugging a completely different project, and needed to print to the console, from a cron job, in a Docker container. Turns out this isn’t as straightforward as I thought. Foreground cron Before you even get…
-
Peek inside a Docker image
A ‘dockerfile’ contains all the instructions to build a Docker image. Here’s my first draft for a project I’m working on: COPY . . is copying all of the files in my project into the working directory of the image so they can be run. Of course we don’t need them all for the app…
-
Hosting Your Own Docker Registry
The Docker Personal (ie free tier) plan currently allows one private repository, but even if you want to pay for the next level where you can have unlimited repositories, you may still want to host your own private registry – it’s going to be quicker inside your network, and you won’t run up against Docker’s…
-
Certbot – removing a domain
I had a number of domains all running on one host when I first set them up with certbot. One started to be serious, so I moved it to another host and ran certbot there. That all worked perfectly, but of course, the old domain is still part of the original certificate, so when I…