cleaning up docker

It’s been a while since I used Docker on my machine so I decided to clean things up. When I launched Docker, it prompted me to upgrade. Half a gig but easy to get that out of the way at least.

Then I ran “docker images” and was reminded that I haven’t done a good job of keeping this clean. I had:

  • the original docker-whale play
  • a bunch of experiments from when I didn’t know what I was doing (some of which have unnamed layers so I don’t even know what they are)
  • some Java 9 early access edition stuff
  • following along with the “Kubernetes in Action” book when I was the Technical Development Editor
  • a lab I went to

Note: i’m not sure if any of this is a good way of doing things. But it worked for me.

Deleting the images the slow way

Yuck. I decided to delete all the images. For some, it was easy. Just run “docker rmi <imageHash>”.

For some, I got

Error response from daemon: conflict: unable to delete xxx (cannot be forced) - image has dependent child images

I also tried running “docker rmi $(docker images -a -q)” to delete all the images. This deleted some, but gave the same dependent child images error.

Great, I don’t know what they are.  Luckily, StackOverflow had a command to find the children.

for i in $(docker images -q)
do
    docker history $i | grep -q xxx && echo $i
done | sort -u

I also got:

Error response from daemon: conflict: unable to delete xxx (must be forced) - image is referenced in multiple repositories

For these, it was just a matter of running “docker -rmi –force xxx.”

Deleting the images the fast way

I deleted the rest of the images with:

“docker rmi –force $(docker images -a -q)”

Containers and volumes

I did a far better job of cleaning these up!

docker ps -a

docker volume ls

two factor and google voice

I’ve been using two factor authentication for a number of years.  I like when services offer a choice of two factor options. Or the common Google Authenticator app. Less of a fan of SMS required two factor. If I lose my phone or number, I can’t two factor authenticate to a few services. The most recent being Venmo. Ironically, Venmo wouldn’t let me change.

One of my friends has used Google Voice for phone for years. I decided to switch to a Google Voice number. This gives me a few advantages:

  • phone rings on multiple devices
  • texts get turned into email which means I can view them on multiple devices (nice for two factor)
  • I’m decoupled from my cell phone number for two factor

Today I’m switching over a bunch of services to use a different phone number for two factor. This table shows the services I can think of where I use two factor.

Interestingly, having possession of the original phone number was not necessary for any of the services. So I could have done this even if I had lost my phone. I had enough other options set up for two factor. Also ironically, I couldn’t switch Venmo which motivated all this. I can close the account though so if this ever becomes a problem…

Service Two Factor Options How Switching Went
Google

(original blog post)

Authenticator, SMS, phone, codes, key, Google prompt Google knew my number in my profile, but I still had to verify to set in profile. And again when wetting as my two factor option. Emailed that changed number.
Amazon

(original blog post)

Authenticator, phone, SMS Under my account added a mobile number. Confirmed with SMS text verification.
Twitter

(original blog post)

Authenticator, SMS, security key, backup code Went to mobile and clicked edit to change number. I didn’t enable SMS, but now it has the right number in case I need it as a one off. Confirmed with SMS text verification.
Facebook Authenticator, SMS, codes, key Went to security and use two factor. Added Google voice and backup. Emailed that added number.

(Only allowed SMS last I looked. Good improvement).

Venmo Just SMS Won’t accept my Google voice number and gave an error that it needs a mobile number. 
GitHub (original blog post) Choice of authenticator, SMS, security keys, recovery tokens (other site), and recovery codes (strings) Clear existing number. Set new Google voice number. Enter code texted to new number. GitHub also emailed me that I added and removed a SMS number.
PayPal

(original blog post)

SMS, phone Confirming my landline number, it had me type a code when they called instead of supplying a code read to me. This seems more secure. Good! The new number was added as unconfirmed. I clicked confirm to get a text to confirm it.
LinkedIn

(original blog post)

SMS I couldn’t find the two factor page without a direct link. I scrolled up and added a phone number. After confirming the verification code, it automatically made the new phone number primary. I couldn’t delete the original since it is used for two factor. So I went to the two factor section and changed the number. it sent me a code again. Then I finally went back and deleted the original number. And for every one of those operations, I had to enter my linked in password. This felt excessive.
DropBox

(original blog post)

Authenticator, SMS, codes, physical device Went to settings and changed my number. I had to enter my authenticator code but not verify possession of the phone number. Emailed that changed two factor settings.
Yahoo

(original blog post)

Email, phone, text Went to account to try to change number. Got an error that it can’t accept a VOIP number. I was able to change it my land line. I use Yahoo almost never so it doesn’t matter whether this is convenient. Emailed that removed and added number.
Slack Authenticator Added my phone number. No verification required.
Apple

(original blog post)

Various Added a trusted phone number and confirmed code. Verified with my computer as well as the code. Removed original number. Emailed that number changed

creating my first video

When I was at Oracle Code New York in March, Bob Rhubart asked me if I’d be up for creating a “two minute tech tip”. It’s a two minute video that you record yourself presenting a tip tip. I said I’d think about it. I didn’t do anything with it.

I wasn’t worried about content. I’m a Toastmaster. We do 1-2 minute talks frequently for practice. They are called Table Topics. With the two minute tech tip, I’d get to pick the topic so in that respect it is easier.

So what prevented me from actually creating the video? There were three things:

  1. I’ve never liked watching myself on video. And I’m better when I can at least pretend I don’t know I’m being recorded. Looking at the camera doesn’t help with that.
  2. I’d never created a video using my computer and didn’t know how.
  3. I live in a studio apartment in New York City. As you might imagine, these apartments aren’t known for having lots of space. Which means I frequently need to move things. I figured creating a video would be a lot of moving things around.

Now that I’m speaking at Oracle Code One, Bob asked again. This time about a video interview and/or a two minute tech tip. Since Oracle listed me as a featured speaker, me being too lazy to deal with problem 2 and 3 feels like a weak argument! And problem #1 is just something I have to live with. I haven’t let it prevent me from having conference sessions recorded so this is no different.

Creating a video

Creating a video (at least on Mac), turned out to be really easy. QuickTime Player has a “new movie recording” option. It really was as easy as sliding the webcam cover over so I don’t have a solid black image and pressing record. That was a silly thing to have as an impediment. It was a non-issue.

Getting ready

I also overestimated the complexity of getting ready in my mind. When I do a Skype video call with a friend or even my teammates, I just turn on the camera and go. That’s not what I want on youtube though. Luckily, it wasn’t that different. What I did:

  1. Move my five foot tall oscillating fan so it isn’t in the background. I don’t think it is terrible to have this in the background, but it wasn’t a big deal to move. (I also had to move two things in front of it to get to it.
  2. Move a couple of things on my eating area table so they aren’t in the frame. The napkin holder created glare, so this actually was necessary.
  3. Angle the laptop two inches to get the wall of the eating area table out of the frame. This made the background solid instead of a light switch and (two different colors.)
  4. Move my chair two inches so my head/body is covering the lamp behind me.
  5. Adjust lighting – during the day, having the lamp behind me off and the table lamp on was just perfect.
  6. Clear off table so don’t see papers on it (this allows my head to be in the middle of the camera angle)