Say Hello to Docker#
This lab will help you know that you have your development environment ready for building Docker containers. In it you’ll start a public container that exposes a network port and connect to it from your browser.
DokuWiki in a Container#
Dokuwiki is a PHP based wiki site. You can find a Docker container for it on DockerHub that’s packaged by Bitnami. Bitnami makes a lot of conveniently packaged Docker containers. Start your
$ docker run -it --rm -p 8080:8080 bitnami/dokuwiki:latest
What does it do?
The command starts a bitnami/dokuwki
container with the build tag latest
. The host’s port 8080
is connected to the container port 8080
.
Cloud Shell Editor#
Click the “Web Preview” button in Cloud Shell editor in the top right. Select port 8080 and Dokuwiki loads in a new tab.
VM Environments#
In vscode select the Ports
Tab beside the Terminal
tab. Add a new forward from the VM’s port 8080
to localhost:8080
. Now visit Dokuwiki on your local browser on the URL http://localhost:8080
.
Native Environments#
Dokuwiki should be viewable on http://localhost:8080
.
Clean Up#
Typing Ctrl-C
on the keyboard stops and deletes the Dokuwiki container.