I’ve recently had occasion to start writing a series of services on the AWS stack using the Serverless Framework. Serverless is a great framework, but I really don’t like having to deploy stuff to AWS to test DynamoboDB streams, SQS queues, etc. That’s where LocalStack comes in. LocalStack lets you host an entire AWS ecosystem locally so you can test “all the things” without actually deploying anything.
LocalStack works great, but I discovered there are a few undocumented things that you’ll need to know to get your stuff working correctly locally.
Read more...Sometimes you need to run cron or other applications in your Debian container that rely on the system running in localtime. In Debian 9, switching to localtime wasn’t the easiest thing in the world. With Debian 10, however, you can switch your container to another timezone with just a few commands.
First you need to install tzdata.
RUN apt-get install tzdata -y
Then you need to make a link between the timezone you want to move to in /usr/share/zoneinfo and /etc/localtime.
Recently, I needed to get cron working inside a Docker container running Debian Slim. It’s not difficult once you figure it out, but it did take a bit of research and learning to get everything to work.
First off, Debian Slim is real slim. There’s no cron nor is there a syslog when you want to debug things. Add apt-get install cron and rsyslog in your Dockerfile before you start anything else. With syslog installed, you can tail /var/log/syslog while you’re debugging your cron files, which is incredibly helpful.