Docker Captains are select members of the community that are both experts in their field and are passionate about sharing their Docker knowledge with others. “Docker Captains Take 5” is a regular blog series where we get a closer look at our Captains and ask them the same broad set of questions ranging from what their best Docker tip is to whether they prefer cats or dogs (personally, we like whales and turtlesover here). Today, we’re interviewing Sebastián Ramírez who has been a Docker Captain since 2022. He is a Staff Software Engineer at Forethought and is based in Berlin, Germany.
How/when did you first discover Docker?
Several years ago, I was working in a company with a team of developers, handling servers manually. We would connect to the servers via SSH, install packages, configure files by hand… it was a whole mess. We had lots of SnowflakeServers, which is really bad. 😅
I was trying to figure out ways to automatize that process, so that we could remove a server and rebuild it from scratch in very little time. I tried many tools, starting with simple Bash scripts, going to packages to handle deployments like Ansible, Salt, Chef, Puppet, etc.
At that point, when I was getting a bit overwhelmed with the complexity of the alternatives, I discovered Docker. I had seen many
Dockerfiles in many GitHub repositories, but I had no idea what it was yet. I studied it, started using it, and immediately fell in love.
What is your favorite Docker command?
docker ps, I’m always checking if the stack is already up, if there’s any other container up, if there are any exited containers with errors, the ports used by containers, etc. I feel it’s the command I’m using most frequently.
What is your top tip for working with Docker that others may not know?
It’s probably that you can override the default command of a Docker image, in Docker or Docker Compose. And you can use a command to just keep the container alive, like
And then you can combine that with mounting the volume of your code as a host volume.
And then you can get inside the container with
docker exec, and from inside, run your app. This way you can develop live from your code without even having to build the image again. And if you get an error you can just fix it and run the command again. And the
sleep infinity will make sure the container stays alive even after the error, so you can continue developing very quickly, without even having to restart the container.
What’s the coolest Docker demo you have done/seen?
I have seen and done so many! One of the things that always amazes me is how easy it is to try out a new system, a new database, a new tool.
I have been able to learn and use many databases, SQL and NoSQL, search engines, job queues, etc. Docker always plays a key role in it. I know that for almost anything I want to try there will be an official image in the Docker Hub, with sensible defaults, simple configurations (in most of the cases just environment variables), and with the security and isolation benefits of containers you get used to love when working with Docker.
What have you worked on in the past six months that you’re particularly proud of?
That will probably be FastAPI! A Python framework for building web APIs using type annotations. And also my other open source projects, like Typer, SQLModel, Asyncer.
I’m also proud of contributing to other open source packages, and writing documentation that seems to help other developers use tools and be more efficient. 🤓
What do you anticipate will be Docker’s biggest announcement this year?
I wouldn’t know! Docker always has a way to bring simple but clever ideas, I’m looking forward to seeing what’s next!
What are some personal goals for the next year with respect to the Docker community ?
I’ve been a Docker fan for a long time, I feel it helps developers a lot improving all the workflows and making us more efficient. I hope more developers can learn how to use it, at least the basics, and improve their work with it.
What talk would you most love to see at DockerCon 2022?
So many things! Probably tips and tricks from developers using Docker.
For example, only recently I discovered there’s a Linux command that you can use with Docker:
sleep infinity. Before discovering that, I would do complex things like
bash -c “while true; sleep 10; done”, both of those achieve the same, but the first one is so much simpler! I just didn’t know it existed, and it’s super useful during development.
I would love to learn what other tricks are there.
Looking to the distant future, what is the technology that you’re most excited about and that you think holds a lot of promise?
I love Python, the programming language. I feel it’s evolving and maturing more and more, in a way that makes it extremely convenient to work with and to develop advanced applications in a simple way. And it works very well with Docker!
Rapid fire questions…
What new skill have you mastered during the pandemic?
Getting delivery groceries without leaving the house. I’m not necessarily proud of that. 😅
Cats or Dogs?
Both! And snakes! 🐍
Salty, sour or sweet?
First salty with sour and then sweet, please.
Beach or mountains?
Is there WiFi?
Your most often used emoji?
I would like to say 🚀, but I would probably be lying. It’s most certainly this one: 😅.