Before you go diving into compiling the Linux kernel, you can run this quick test Docker image to get familiar with Docker.
First, you're going to create a Dockerfile file. These files are run to create the Docker images and they use their own syntax. Copy and paste the following text into your preferred text editor:
FROM ubuntu:22.04 RUN apt-get update ENTRYPOINT ["tail", "-f", "/dev/null"]
Then, save the file as Dockerfile with no file extension. The Dockerfile you just created builds an Ubuntu 22.04 system. Then, it runs apt-get update
and opens a terminal window for you to interact with the system. If you were to leave out the ENTRYPOINT
line, the image would simply run apt-get update
and then close down.
Next, open up a terminal and navigate to the folder where you just saved your Dockerfile. Run the following command to build the image:
docker build -t docker_test .
This tells docker to build the Dockerfile as an image and tag it (name it) as docker_test.
Go to your Docker desktop application and click on the Images tab. You should see your docker_test image that you just built.
The image is static, similar to creating a USB drive with installation media if you've ever done a fresh install of Windows or Linux on hardware. To deploy the image that you just built, click on the Play button next to the image name. A dialog box will open and you'll click Run.
This launches your image into a container. The container is where your virtual computer lives and runs. It is given the name of an adjective along with the name of a scientist as a nickname by default.
If you click on the Terminal tab in the container, you can interact with your new Ubuntu image.
On the main Containers page, you can start or stop your container from running by clicking the Play or Stop buttons on the right-hand side of the window.
Now that you've created your first Dockerfile, image and container, you can try using Docker to compile Linux for the ESP32-S3.
Text editor powered by tinymce.