Simon Willison’s Weblog

Subscribe
Atom feed for docker

48 items tagged “docker”

2018

Building smaller Python Docker images

Changes are afoot at Zeit Now, my preferred hosting provider for the past year (see previous posts). They have announced Now 2.0, an intriguing new approach to providing auto-scaling immutable deployments. It’s built on top of lambdas, and comes with a whole host of new constraints: code needs to fit into a 5MB bundle for example (though it looks like this restriction will soon be relaxed a littleupdate November 19th you can now bump this up to 50MB).

[... 1,872 words]

elasticsearch-dump. Neat open source utility by TaskRabbit for importing and exporting data in bulk from Elasticsearch. It can copy data from one Elasticsearch cluster directly to another or to an intermediary file, making it a swiss-army knife for migrating data around. I successfully used the “docker run” incantation to execute it without needing to worry about having the correct version of Node.js installed.

# 9th April 2018, 10:10 pm / docker, nodejs, elasticsearch

rubber-docker/linux.c. rubber-docker is a workshop that talks through building a simply Docker clone from scratch in Python. I particularly liked this detail: linux.c is a Python extension written in C that exposes a small collection of Linux syscalls that are needed for the project—clone, mount, pivot_root, setns, umount, umount2 and unshare. Just reading through this module gives a really nice overview of how some of Docker’s underlying magic actually work.

# 2nd April 2018, 6:18 pm / docker, python

Cloud-first: Rapid webapp deployment using containers (via) The Research Software Engineering group at ICL have written a tutorial on deploying web apps as Docker containers using Azure and they use Datasette as the example application.

# 28th March 2018, 3:50 pm / docker, datasette, azure

Andrew Godwin’s www-router Docker container (via) Really clever Docker trick: a container that runs Nginx and uses it to route traffic to other containers based on the hostname—but the hostnames to be routed are configured using environment variables which the run-nginx.py CMD script uses to dynamically construct an nginx config when the container starts.

# 21st February 2018, 5:04 am / docker, andrew-godwin, nginx

Building a Full-Text Search App Using Docker and Elasticsearch. Deep, comprehensive tutorial from Patrick Triest showing how to use docker-compose to run three containers (Node API, nginx static content, elasticsearch) and then use that to build a neat Vue.js web search UI against 100 books from Project Gutenberg.

# 1st February 2018, 3:41 pm / docker, nodejs, elasticsearch

2017

How to compile and run a Pony program using Docker. My notes on using the Docker ponylang/ponyc container to compile and execute a Pony program without needing to install anything (since Docker will download and run the image the first time you run the command).

# 18th December 2017, 9:47 pm / docker, pony

Inside Docker’s “FROM scratch” (via) I’m a big fan of understanding your abstractions. Here’s a neat tutorial that dives deep into Docker’s “scratch” image which offers the smallest possible Docker image, and hence provides a great opportunity to understand what a Docker container at its most minimal does for you.

# 27th November 2017, 4:33 pm / docker

Run the First Edition of Unix (1972) with Docker (via) This is so cool... just run “docker run --rm -it bahamat/unix-1st-ed” to drop into a simulation of a PDP-11 running genuine 1972 era Unix! If you haven’t got into Docker yet, Docker for Mac is a single click install these days and works incredibly well.

# 22nd November 2017, 3:36 pm / docker, unix

gzthermal-web (via) I built a quick web application wrapping the gzthermal gzip visualization tool and deployed it to Zeit Now wrapped up in a Docker container. Give it a URL and it shows you a PNG visualization of how gzip encodes that page.

# 21st November 2017, 6:24 pm / zeit-now, projects, docker, sanic

tuxracer-web. Brilliant Docker hack from David Cooper: just run “docker run -p 8008:80 dtcooper/tuxracer-web” to get Tux Racer (the 3D game) running in your browser, on top a cunning mix of the noVNC HTML5 VNC client and icecast for sound.

# 14th November 2017, 11:28 pm / docker

Datasette: instantly create and publish an API for your SQLite databases

I just shipped the first public version of datasette, a new tool for creating and publishing JSON APIs for SQLite databases.

[... 968 words]

Docker.qcow2 never shrinks—disk space usage leak in docker for mac (via) Interesting year-long thread on disk usage by Docker for Mac, including a bunch of potential workarounds for if it swallows too much disk space.

# 5th November 2017, 3:06 pm / docker

Docker Containers on the Desktop (via) Jessie Frazelle’s classic explanation from 2015 of how she runs every desktop application on her Linux machine in its own Docker container.

# 5th November 2017, 4:16 am / docker, linux

Running a load testing Go utility using Docker for Mac

I’m playing around with Zeit Now at the moment (see my previous entry) and decided to hit it with some traffic using Apache Bench. I got this SSL handshake error:

[... 818 words]

arxiv-vanity (via) Beautiful new project from Ben Firshman and Andreas Jansson: “Arxiv Vanity renders academic papers from Arxiv as responsive web pages so you don’t have to squint at a PDF”. It works by pulling the raw LaTeX source code from Arxiv and rendering it to HTML using a heavily customized Pandoc workflow. The real fun is in the architecture: it’s a Django app running on Heroku which fires up on-demand Hyper.sh Docker containers for each individual rendering job.

# 25th October 2017, 8:06 pm / docker, science, ben-firshman, django, pdf

A Brief Intro to Docker for Djangonauts (via) This is great—a really clear introduction to both Docker and Docker Compose, aimed at Django developers. Includes line-by-line annotations of an example Dockerfile and docker-compose.yml.

# 18th October 2017, 9:06 pm / docker, django

2014

Are there any YC startups based around open source software?

There have been a few.

[... 99 words]