wesley tanaka

Dockerfile library

()

I've created some scripts and Dockerfiles to build docker images. There are images for:

Ways to download a file via HTTP from the command line

()

Current Ubuntu distributions do not come with either wget or curl installed, but they do include Python and Perl. Here are some alternative ways to download a file and print it on stdout:

  • curl -L http://example.com/file.tar.gz
  • wget -O- http://example.com/file.tar.gz
  • python3 -c "import sys,urllib.request as r;sys.stdout.buffer.write(r.urlopen('http://example.com/file.tar.gz').read())"

Shaing your home directory between Mac OSX and a VMware Fusion 7 Linux Virtual machine

()

First, give your virtual machine a fixed IP address.  VMWare Fusion's dhcpd server will often change the IP address assigned to your virtual machine -- even while it's still running.  While you can give the entire IP address range block access to your home directory over NFS, that can disrupt some other tools like Vagrant.

% cat /etc/exports
/Users/wtanaka 172.16.221.10 -maproot=root:wheel

Restart nfsd in Mac OS:

% sudo nfsd stop
% sudo nfsd start

Assigning a fixed IP address to a virtual machine in VMware Fusion 7

()

1. Find the dhcpd.conf corresponding to the network that your virtual machine is on.  By default the NAT network uses /Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf. You can find the right one by running ifconfig (or ipconfig in Windows) inside your virtual machine to find its IP address, and look for a range containing that IP address in all of the dhcpd.conf files.

2. Edit the file to add the portions in green.  Be careful not to use a number in the dynamically allocated range, the host computer's IP, or the DNS IP:

Deleting a single URL from Chrome History

()
  1. Go to chrome://history/
  2. Search for the URL in the "Search history" text field
  3. Click and shift click to select all instances
  4. Click "Remove selected items"

Thrift vs Protocol Buffers vs Avro in Python

()

Thrift, Protocol Buffers, and Avro are modern software projects which all contain an IDL-enabled data serialization format with Python support. One might think that because they all have an IDL that they all would enforce some level of type safety even in Python, but one would be wrong:

What is Docker?

()

Docker is a long-lived daemon process with a thin CLI client which makes it easy to clone() new processes with their own PID namespaces, network interfaces, root filesystem, mounts, and hostname.

A docker image contains a filesystem tree (actually an aufs filesystem which allows one image to be implemented as a "layer" on top of another more "base" image).

A Dockerfile is a list of instructions for building a docker image.

AWS Groups vs Roles vs Policies

()

A short overview of terms used by the system that Amazon Web Services (AWS) uses to manage user accounts, roles, permissions and groups:

Do you want some apple juice?

()

R> Daddy, do you want some apple juice?

W> Yes, that sounds good. May I have some of yours?

R> Uh..  Uh..  Mommy, would you get Daddy some apple juice?

Running Ubuntu 14.04 inside VMWare Fusion

()

To get shared folders to work in VMWare Fusion with a Linux guest, I needed to reinstall vmware tools:

  1. sudo vmware-uninstall-tools.pl
  2. install vmware tools from the menu

I couldn't get my home directory to work over hgfs (lightdm would log me in and then the session would immediately exit), so I created an entry in /etc/exports on my mac.

Syndicate content
by Wesley Tanaka