GB
  
You are currently viewing the United Kingdom version of the site.
Would you like to switch to your local site?
14 MIN READ TIME

Docker tips & tricks

YOU’LL NEED THIS

DOCKER ENGINE, PLUS YOUR CHOICE OF CONTAINERS available for Linux, Windows, Mac, QNAP, and Synology

IF YOU FOLLOWED LAST ISSUE’S NAS SERVER BUILD, you’ll have been left hanging with the tantalizing prospect of using Docker to run many, if not all, of your key services. Docker provides a clever way to run a wide range of applications and network services (from VPN and self-hosted cloud-style backup to media streaming) on any supported hardware.

Docker containers make it easy to run services in isolated bubbles, complete with their own dependencies and with tailored access to the outside world. At first glance, it can appear an impenetrable subject but in this tutorial, we’ll show you how to install it on your system, set things up, get a firm understanding of the basics, and deploy your first containers, one to provide a convenient graphical front end, the other to set up a reverse proxy allowing you to securely access selected containers from outside your home network should you wish.

This tutorial focuses on those running a command-line version of Linux, such as Ubuntu Server as featured in last issue’s NAS build. But you can easily run Docker natively on other platforms too—just skip the steps on configuring a dedicated Docker user account.

1INSTALL DOCKER

Docker exists in many forms, such as Docker Desktop for Windows and Mac users, and Docker Engine for Linux command-line distros. Visit https://docs.docker.com/engine/ install/ to click the relevant link for your operating system to access downloads and specific installation instructions.

>> If you followed our advice from last issue’s NAS build, your server will be running a version of Docker supplied by Ubuntu’s own proprietary repository, snap. It works fine but isn’t updated frequently. If you’d prefer to switch to Docker’s repositories, simply follow the guide at https://docs.docker.com/engine/ install/ubuntu/ but ignore the ‘sudo apt-get remove’ command listed, substituting it with this instead: sudo snap remove docker >> Note, the installation process won’t remove any existing containers, images, volumes, or networks you have installed.

>> If you own a Synology or QNAP NAS, you can also install Docker on there—search for Docker (Synology) or Container Station (QNAP) in their respective app stores. Both provide their own user-friendly GUI interfaces for managing your containers, but you can also use our favored web-based front end, Portainer, if you wish.

2CONFIGURE ROOTLESS ACCESS

Docker in Linux works by ‘mapping’ the container’s internal user to your ‘root’ user, which isn’t great for three reasons: security, the fact any files created by the container such as configuration or data files—are owned by root (making them difficult to access), and the need to run Docker commands with the ‘sudo’ prefix.

Unlock this article and much more with
You can enjoy:
Enjoy this edition in full
Instant access to 600+ titles
Thousands of back issues
No contract or commitment
Try for 99p
SUBSCRIBE NOW
30 day trial, then just £9.99 / month. Cancel anytime. New subscribers only.


Learn more
Pocketmags Plus
Pocketmags Plus

This article is from...


View Issues
Maximum PC
FREE Sample Issue
VIEW IN STORE

Other Articles in this Issue


editorial
‘CLOCKING CRAZY
I’M SURE IT hasn’t escaped your attention, but
QUICKSTART
Processor war kicks off again
Zen 4 lands, with Raptor Lake hot on its heels
THE GEFORCE BEAST
THE 4090 TI BOASTS IMPRESSIVE STATS
WI-FI SPEEDS TO DOUBLE
Wi-Fi 7 is on the way
Tech Triumphs and Tragedies
.A monthly snapshot of what’s good and bad in tech
INTEL’S ARC STRUGGLES
Hardware delays and driver problems
GRAPHICS CARD PRICES FINALLY STABLE
There are even some bargains to be found
Quest 2 gets a $100 price rise
META OWNS OCULUS, and its Quest 2 VR
HDDs to reach 30TB
© SEAGATE The death of the HDD, predicted
Ethereum goes PoS
Ethereum, the second biggest cryptocurrency, is moving from
Nvidia’s Monstrous AD102 on Approach
WORD ON THE STREET is that we could
THE LIST
THE TOP FIVE DDR5 RAM
Alas Intel? Don’t panic, it’s not that bad…
©INTEL FULL DISCLOSURE: Previously on this very page,
LETTERS
DOCTOR
THIS MONTH THE DOCTOR TACKLES...
LETTERS
WE TACKLE TOUGH READER QUESTIONS ON...
BUILD IT, UPGRADE IT
BUILD IT, UPGRADE IT,ENJOY IT.
Overclocking may be a dark art but there’s no better way of getting free power upgrades and taking your PC to its limits
WHAT’S IN THE BOX?
CPU COOLER NZXT Kraken X73 RGB AIO Price:
FREE POWER? COUNT US IN
PIECE TOGETHER AN OVERCLOCKING GAMING MENACE
FREE POWER WITH OVERCLOCKING
LEARN THE BASICS AND UNLOCK THE FULL POTENTIAL OF YOUR NEW SYSTEM
UPSCALING ALGORITHMS
WAR OF THE UPSCALING ALGORITHMS
Rendering fewer pixels to boost framerates
THE FUTURE OF STORAGE
THE FUTURE OF STORAGE
As SSDs get faster and cheaper, Jeremy Laird investigates how much more flash memory has to give and whether something better is around the corner
FREE SOFTWARE
MANAGE YOUR FILES LIKE AN EXPERT
TreeSize Free found 125GB of old files that
HOW TO STEP-BY-STEP GUIDES TO IMPROVING YOUR PC
TIP OF THE MONTH HANDY SHORTCUTS Navigating around
Reboot Windows 11 File Explorer
YOU’LL NEED THIS WINDOWS 11 FILE EXPLORER plus
R&D
Machine of the Month: Tandy TRS-80 (1977)
YOU’LL NEED THIS A COPY OF TRS80GP Windows,
Tomb Raider Live Experience
Becoming Lara Croft
Editor’s Pick: HP Elite Dragonfly G2
This x86 power problem really needs sorting
IN THE LAB
SK Hynix Platinum P41 2TB
Welcome to the big league, SK Hynix…
Color ful GeForce GTX 1630
Party like it’s 2019 with this blast from the past
NZXT H7 Elite
The best of the best from NZXT?
Framework Laptop
Do-It-Yourself Upgradeable Laptop
ASRock RX 6750 XT Phantom Gaming D
Graphics prices falling down, falling down…
BenQ Mobiuz E X3210U
The monitor for all occasions?
Nubia Redmagic 7S Pro
Great for gaming, merely OK for everything else
Razer Barracuda Pro
Wireless gaming and lifestyle cans—and a compromise on both
Corsair K70 Pro Mini Wireless
Is this small and quirky keyboard worthy of its hefty price tag?
Stray
Platform gaming meets the ultimate protagonist
Steam vs. Epic Games Launcher
Which is the better place for PC gaming in 2022?
BLUEPRINT
THE BUILDS
THIS MONTH’S STREET PRICES...
Chat
X
Pocketmags Support