With so many programming and scripting languages out there, developers can tackle development projects any number of ways. However, some languages — like JavaScript, Python, and Java — have been perennial favorites. (We’ve previously touched on this while unpacking Stack Overflow’s 2022 Developer Survey results.)
Many developers use Docker in tandem with these languages. We’ve seen our users create some amazing applications! Here are some resources and recommendations to level up your container game with these languages.
Getting Started with Docker
If you’ve never used Docker, you may want to familiarize yourself with some basic concepts first. You can learn the technical fundamentals of Docker and containerization via our “Orientation and Setup” guide and our introductory page. You’ll learn how containers work, and even how to harness tools like the Docker CLI or Docker Desktop.
Our Orientation page also serves as a foundation for many of our own official walkthroughs. This is a great resource if you’re completely new to Docker!
If you prefer hands-on learning, look no further than Shy Ruparel’s “Getting Started with Docker” video guide. Shy will introduce you to Docker’s architecture, essential CLI commands, Docker Desktop tips, and sample applications.
If you’re feeling comfortable with Docker, feel free to jump to your language-specific section using the links below. We’ve created language-specific workflows for each top language within our documentation (AKA “Our Language Modules” in this blog). These steps are linked below alongside some extra exploratory resources. We’ll also include some awesome-compose code samples to accelerate similar development projects — or to serve as inspiration.
Table of Contents
- How to Use Docker with JavaScript
- How to Use Docker with Python
- How to Use Docker with Java
- How to Use Docker with Go
How to Use Docker with JavaScript
JavaScript has been the programming world’s leading language for 10 years running. Luckily, there are also many ways to use JavaScript and Docker together. Check out these resources to harness JavaScript, Node.js, and other runtimes or frameworks with Docker.
Docker Node.js Modules
Before exploring further, it’s worth completing our learning modules for Node. These take you through the basics and set you up for increasingly-complex projects later on. We recommend completing these in order:
- Overview for Node.js (covering learning objectives and containerization of your Node application)
- Build your Node image
- Run your image as a container
- Use containers for development
- Run your tests using Node.js and Mocha frameworks
- Configure CI/CD for your application
- Deploy your app
It’s also possible that you’ll want to explore more processes for building minimum viable products (MVPs) or pulling container images. You can read more by visiting the following links.
Other Essential Node Resources
- Docker Docs: Building a Simple Todo List Manager with Node.js (creating a minimum viable product)
- Docker Hub: The Node.js Official Image
- Docker Hub: The docker/dev-environments-javascript image (contains Dockerfiles for building images used by the Docker Dev Environments feature)
- GitHub: Official Docker and Node.js Best Practices (via the OpenJS Foundation)
- GitHub: Awesome Compose sample #1 (building a Node.js application with an NGINX proxy and a Redis database)
- GitHub: Awesome Compose samples #2 and #3 (building a React app with a Node backend and either a MySQL or MongoDB database)
How to Use Docker with Python
Python has consistently been one of our developer community’s favorite languages. From building simple sample apps to leveraging machine learning frameworks, the language supports a variety of workloads. You can learn more about the dynamic duo of Python and Docker via these links.
Docker Python Modules
Similar to Node.js, these pages from our documentation are a great starting point for harnessing Python and Docker:
- Overview for Python
- Build your Python image
- Run your image as a container
- Use containers for development (featuring Python and MySQL)
- Configure CI/CD for your application
- Deploy your app
Other Essential Python Resources
- Docker Hub: The Python Official Image
- Docker Hub: The PyPy Official Image (a fast, compliant alternative implementation of the Python language)
- Docker Hub: The Hylang Official Image (for converting expressions and data structures into Python’s abstract syntax tree (AST))
- Docker Blog: How to “Dockerize” Your Python Applications (tips for using CLI commands, Docker Desktop, and third-party libraries to containerize your app)
- Docker Blog: Tracking Global Vaccination Rates with Docker, Python, and IoT (an informative, beginner-friendly tutorial for running Python containers atop Raspberry Pis)
- GitHub: Awesome Compose sample #1 (building a sample app using both Python/Flask and a Redis database)
- GitHub: Awesome Compose samples #2 and #3 (building a Python/Flask app with an NGINX proxy and either a MongoDB or MySQL database)
How to Use Docker with Java
Both its maturity and the popularity of Spring Boot have contributed to Java’s growth over the years. It’s easy to pair Java with Docker! Here are some resources to help you do it.
Docker Java Modules
Like with Python, these modules can help you hit the ground running with Java and Docker:
- Overview for Java
- Build your Java image
- Run your image as a container
- Use containers for development
- Run your tests
- Configure CI/CD for your application
- Deploy your app
Other Essential Java Resources
- Docker Hub: The openjdk Official Image (use this instead of the Java Official Image, which is now deprecated)
- Docker Hub: The Apache Tomcat Official Image (an open source web server that implements both the Java Servlet and JavaServer Pages (JSP)
- Docker Hub: The ibmjava Official Image (implementing IBM’s SDK, Java Technology Edition Docker Image)
- Docker Hub: The Apache Groovy Official Image (an optionally-typed, dynamic language for statically compiling Java applications and boosting productivity)
- Docker Hub: The eclipse-temurin Official Image (provides code and processes for building runtime binaries or associated technologies, featured in the following “9 Tips” blog post)
- Docker Blog: 9 Tips for Containerizing Your Spring Boot Code
- Docker Blog: Kickstart Your Spring Boot Application Development
- GitHub: Awesome Compose sample #1 (building a React app with a Spring backend and a MySQL database)
- GitHub: Awesome Compose sample #2 (building a Java Spark application with a MySQL database)
- GitHub: Awesome Compose sample #3 (building a simple Spark Java application)
- GitHub: Awesome Compose sample #4 (building a Java app with the Spring Framework and a Postgres database)
How to Use Docker with Go
Last, but not least, Go has become a popular language for Docker users. According to Stack Overflow’s 2022 Developer Survey, over 10,000 JavaScript users (of roughly 46,000) want to start or continue developing in Go or Rust. It’s often positioned as an alternative to C++, yet many Go users originally transition over from Python and Ruby.
There’s tremendous overlap there. Go’s ecosystem is growing, and it’s become increasingly useful for scaling workloads. Check out these links to jumpstart your Go and Docker development.
Docker Go Modules
- Overview for Go
- Build your Go image
- Run your image as a container
- Use containers for development
- Run your tests using Go test
- Configure CI/CD for your application
- Deploy your app
Other Essential Go Resources
- Docker Hub: The Golang Official Image
- Docker Hub: The Caddy Official Image (for building enterprise-ready web servers with automatic HTTPS)
- Docker Hub: The circleci/golang image (for extending the Golang Official Image to work better with CircleCI)
- Docker Blog: Deploying Web Applications Quicker and Easier with Caddy 2 (creating a Caddy 2 web server and Dockerizing any associated applications)
- GitHub: Awesome Compose samples #1 and #2 (building a Go server with an NGINX proxy and either a Postgres or MySQL database)
- GitHub: Awesome Compose sample #3 (building an NGINX proxy with a Go backend)
- GitHub: Awesome Compose sample #4 (building a TRAEFIK proxy with a Go backend)
Build in the Language You Want with Docker
Docker supports all of today’s leading languages. It’s easy to containerize your application and deploy cross-platform without having to make concessions. You can bring your workflows, your workloads, and, ultimately, your users along.
And that’s just the tip of the iceberg. We welcome developers who develop in other languages like Rust, TypeScript, C#, and many more. Docker images make it easy to create these applications from scratch.
We hope these resources have helped you discover and explore how Docker works with your preferred language. Visit our language-specific guides page to learn key best practices and image management tips for using these languages with Docker Desktop.