Docker Consoles (beta)

Here at PythonAnywhere industries, there’s nothing we love better than a bandwagon. Plus the logos are so cool! So it’s docker-fever in the office.

In all seriousness, we’ve been rolling our own sandboxing/virtualisation/isolation solution and evolving it since the very first days of PythonAnywhere (4 years ago, if you can believe that), based on chroot and cgroups and all that wonderful containerey stuff. But we wanted to investigate Docker as an alternative shrinkwrapped solution, and the first step of that is ready now.

The first element in our beta is “Docker consoles”, which takes our normal execution environment and dockerizes it. We’d love to have a few of you join the beta and try them out:

What to expect

The consoles will look exactly like normal consoles, with all the normal “batteries included” libraries and python packages available

A few small additional things will work that didn’t used to:

  • ps will work, after a fashion, showing you any child processes of that console (but not processes issued from other consoles or on other servers. For that, use our process listing button on the consoles page).

  • /proc will be available, showing your processes for that console session. This will mean that several binaries that had a dependency on /proc will start working, which includes phantomjs, which lots of people have been asking about. It may also mean we might be able to install java on the servers one day, although whether that’s a good idea is open for debate ;)

Some limitations and known bugs

  • You can’t use your own docker images – we supply an image which mirrors a normal pythonanywhere console. you also won’t have root access, just like in a regular console.

  • Teachers, currently you won’t be able to have your students’ home directories mounted for access via Bash consoles, so this isn’t ready for you yet.

  • This currently only works in consoles, not scheduled tasks or web apps.

  • There’s a minor bug which will show the error message bash: line 0: cd: ... No such file or directory which you might occasionally see at the top of consoles, especially if you use the “start console here” links. It’s fairly harmless.

  • tmux may not work in docker consoles due to an issue with AppArmor which we’re currently looking into.

How to sign up

Give us a shout via and we’ll switch on docker consoles for your account.

comments powered by Disqus