I was wrong about Docker

I recently found an answer that I gave someone to a Facebook chat question in ~2016-2017, and was amazed at how “technically right” I was (i.e. totally wrong for the career question that I was answering).

I just wanted to post this to show that I am often too technologically focused, and that this can often get in the way of getting hired and getting things done the way everyone else is doing them. On the flipside, my heart is in the right place and this approach certainly wouldn’t have HURT the person I was giving advice to.

Here it is!


Yeah, I should make some docker vids! So, LXC is the original Linux-native implementation of containers. There was an implementation before, called OpenVZ, but that relied on a patched Linux kernel and I don’t think it’s used much anymore.

The mainline kernel itself exposes the “ingredients” for containers (user/process namespacing, cgroups, etc.) and LXC was one of the original implementations of ‘containers’ using these native building blocks.

Docker was originally a wrapper around LXC, but has now actually created their own implementation of the container back-end (using the same exposed ‘ingredients’ from the Linux kernel that LXC uses).

LXC (and now LXD) is under-hyped, solid, and a bit more intuitive for learning (more like FreeBSD Jails, less hype/magic than Docker). I think it’s good to learn LXC or FreeBSD jails before jumping into Docker.

All the concepts from LXC are totally applicable to Docker as well.

Docker, as a software product, layers some extra tools on top of this basic ‘containerization’ tech: they have their docker ‘hubs’ — pre-built application containers. They have extra networking stuff on top of what you’d get with LXC. They have something that looks like very basic container linking/service discovery. They have enormous amounts of hype, which can help you get a high-paying job (seriously. It’s worth learning just for that.)

I’m torn, because I’ve used Docker since before it was an open-source product (it used to be a paid thing called DotCloud), and have hated it for almost the entire time. It’s a complex, unstable, and questionably architected piece of software. It’s also incredibly overhyped and misused.

BUT: Docker has some great ideas in it, and is absolutely worth learning for your career. As a technology, it leaves a lot to be desired.

I’d love to hear what you think of Docker after getting comfortable with LXC. LXC will teach you the concepts that underlie all of this containerization stuff, and Docker adds some new features (and new headaches) onto that.

Let me know what you think, if/when you start your Docker journey!

How to Record Your Work on the Command Line with the script(1) Command

Most Unix-like operating systems feature a script command. You can find its manual in script(1) (type man 1 script to access it). script records a transcript (“typescript,” not to be confused with the language TypeScript) of your current session in the command line.

The script command can be used as a way to log what you are doing in a shell session. It’s often used during troubleshooting, documentation, PCI compliance audits, security/remediation work, penetration tests, and other situations where it’s useful to record a play-by-play log of what you’re doing on the machine.

 

Practical Demonstration

 

Read more

Cron Jobs

Cron jobs allow you to repeatedly run commands. They can be run both in a timed manner, but also on bootup. While cron may seem a bit confusing in the beginning, it’s actually very simple to use once you know how it works.

Read more

man man – What does the 1 in ls(1) mean?

man pages – many people would have loved to have known earlier about them. This article could be summed up as “just read man-pages(7)”. But what does that mean and why should you care?

Read more

Git: Setting up a low-requirements, personal Git repository

In this tutorial you will learn how to  how to quickly set up a simple, low-requirements, no-database, no-webserver Git repository. All you need is (unprivileged) SSH access and the git program itself.

Read more

Shell Aliases

When working on Linux and Unix systems, you’ll often find yourself using long shell commands that you repeat several times per day (or per session). Things like

  • checking on the current resource usage of a system,
  • checking if a process has completed yet, or
  • using a complex group of commands, piped together with special options to give you just the output you want.

Generally, you’ll either use CTRL+R to search for these past commands in the shell’s history. Some of you may even copy useful commands to a special file that you can easily reference. You might even just enter them manually each time you need them, since you’re too lazy to be bothered.

There’s a simple solution that covers all of these cases well: Aliases.

Read more

How to convert an SSH2 Public Key into an OpenSSH public key

When working with people who don’t use a Unix-based operating system, you’ll often come across the SSH2 Public Key format. PuTTY is probably the most famous software using this format and nearly everyone on Windows uses it. To give these windows ssh users access to a Linux system, SFTP server, Git repository or other systems that use the OpenSSH key format, you need to convert an SSH2 public key into the OpenSSH format. This article describes how to do exactly that.

For more Linux and programming tips, tricks, and videos, check out my channel here: https://www.youtube.com/c/tutorialinux — I have a completely free Linux Sysadmin course in this free Linux course playlist.

Okay, onto the openssh key converting goodness!

Read more

Physical Servers vs. Cloud Providers

When you’re architecting a solution for some kind of business or infrastructure problem, there are many things to consider: base load, peak load, growth rate, skill levels and specialties of the tech people your client has available to them, and much more. Your solution (whether ‘cloud,’ physical, or both) needs to give the maximum amount of value for the money you’re given to play with.

Let’s take a look at some advantages and disadvantages of both cloud (Amazon AWS EC2) and physical servers.

Read more

Where to Get a ‘Cloud’ Server For $5/month

So you’re playing with setting up a cool project or web application (like the one I show you how to set up in my new Udemy course), and you want it to be accessible for your friends, your family, and yourself (while traveling away from your home network). How do you set that up?

Buckle up; I’m about to explain all the things.

Read more

Want to keep your Eyes healthy? Use Redshift

If you’re spending a lot of time looking at a screen, you’ll probably want to turn down the blues, to give your eyes a chance: http://jonls.dk/redshift/.

To install, just use your operating system’s package manager (apt, pkg, pacman, etc.) to install redshift. On Ubuntu and Debian, this would be:

apt-get install redshift

Try a few of the following commands, and see which you like better (just run these in a terminal, and kill one before trying the other. It’ll take a few seconds to actually shift the colors on your screen; be patient):

Read more