Today I was invited to join Gabor Szabo for a live pair programming session, where we worked on adding Docker and CI to his course management application. You can view the video of our informal competition who is the worst typist here.
At first I was bit skeptical about the concept of live coding (who wants to watch people google^w code for two hours?), but in the end it was a funny and informative (for me) session. Maybe I'm just totally deprived of live human interaction (thanks, Corona), but I think I'd enjoy similar sessions also under normal circumstances.
Things I learned
- I forgot a lot of docker command line options after mostly using docker-compose.
- There is no really smooth way to
COPYa lot of dirs into the container.
- Adding a
.dockerignorefile (to ignore at least
~/.git/) saves some time and network, because docker will not send the ignored files to the docker daemon in the famous
sending build context to docker daemonstep at the start of each build.
-Pexposes the ports listed in
EXPOSE, but maps them to random ports on the host (which makes no sense during dev, but probably when deploying to clouds)
- Some people prefer
-ti, some prefer
- I'm a bit rusty on using the github pull request workflow (esp. the part where you have to fetch upgrades from upstream), due to mostly working on repos where several devs have direct write access.
- Setting up github CI is really not a lot of work (at least to only run the basic tests). Only 16 lines of YAML. I will try to add this to my CPAN github repos.
If you're interested in the Dockerfile aspect of this session, may I point you to my talk Writing a good Dockerfile for a (Perl) app from the 2020 Perl Conference, where I elaborate on some of the finer points, and with better preparation than today :-)
Oh, and this reminds me that I should submit a talk (maybe on docker-compose?) for this years Perl & Raku conference. The CfP runs until tomorrow, so I better hurry.