How to install Docker on ChromeOS

Date:

Share:

[ad_1]

Jack Wallen shows you how to install Docker on your Chromebook so you can start developing containers on the go.

Portland, OR, USA - Feb 4, 2021: Closeup of the Google Chrome logo seen on a Samsung Chromebook 500c isolated on white.
Image: Tada Images/Adobe Stock

Chromebooks are great mobile devices because they’re simple to use, secure and fast. Because of those reasons, Chromebooks could make for outstanding development devices. And if Docker is your development environment of choice, you’re in luck. Thanks to Linux, it’s possible to install Docker on ChromeOS so you can work your container dev magic on the go with ease.

I’m going to show you how to install Docker on ChromeOS, a task you should be able to complete in a few short minutes.

SEE: Hiring kit: Back-end Developer (TechRepublic Premium)

What you’ll need to install Docker

To install Docker, you’ll need a Chromebook with an updated version of ChromeOS.

How to add Linux to your Chromebook

The first thing you must do is enable Linux on your Chromebook. This is done by going to Settings | Advanced | Developers. There, you’ll find Linux Development Environment listed.

Click Turn On (Figure A) and follow the on-screen instructions. This process will take a few minutes to complete but, once it’s finished, you’ll see a terminal window opened, where you can start using Linux on your Chromebook.

Figure A

Enabling Linux on ChromeOS with a single click.

How to install Docker

From the now-open Linux terminal window, update apt with the command:

sudo apt-get update

Once apt has updated, install the required dependencies with the command:

sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y

With the dependencies out of the way, download and install the official Docker GPG key with:

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

Add the required fingerprint:

sudo apt-key fingerprint 0EBFCD88

Add the official Docker repository with the command:

sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable”

Update apt with the command:

sudo apt-get update

Finally, install Docker with:

sudo apt-get install docker-ce docker-ce-cli containerd.io -y

Next, you need to add your user to the docker group with the command:

sudo usermod -aG docker $USER

Close the Linux terminal and log out of your Chromebook. Log back in, open the Linux terminal app and you should now be able to run the docker command without sudo, which would be a security risk.

How to test the container deployment

Test your new installation out by running the Hello World container with the command:

docker run hello-world

You should be greeted by the Hello World text in the terminal window. Another example would be deploying the NGINX container with the command:

docker run --name docker-nginx -p 8080:80 -d nginx

Test the deployment with the command:

curl 0.0.0.0:8080

You should see the text output of the NGINX welcome page, which includes the line “Thank you for using nginx.” You could also open the Chrome web browser on your Chromebook and point it to 0.0.0.0:8080 and see the welcome screen in the browser (Figure B).

Figure B

Our NGINX container has successfully deployed on ChromeOS, thanks to Docker.

Congratulations, you can now develop with Docker on your Chromebook. At this point, Docker should work as expected and you can build your containers and stacks as usual.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.

[ad_2]

Source link

━ more like this

Sends shares Q1 2026 business update and product progress

Sends reported Q1 2026 updates sharing news on digital cards, app redesign, ClearBank integration, and fintech industry recognition. Sends, a fintech platform operated by Smartflow...

We swipe our phones all day, and scientists just ranked which ones are the most tiring

We all know staring at your phone for hours isn’t great for mental health. But what about your fingers? Previously, researchers couldn’t measure...

Two suspects have been arrested for allegedly shooting at Sam Altman’s house

OpenAI CEO Sam Altman's house may have been the target of a second attack after San Francisco Police Department arrested two suspects for...

You Can Soon Buy a $4,370 Humanoid Robot on AliExpress

Listing consumer electronics on the internet's large ecommerce marketplaces is a key step in “democratizing” the products, allowing them to be purchased by...
spot_img