Skip to content

Instantly share code, notes, and snippets.

@looselytyped
Last active August 16, 2023 14:29
Show Gist options
  • Save looselytyped/247180fd31c6bcb06e37f59308484874 to your computer and use it in GitHub Desktop.
Save looselytyped/247180fd31c6bcb06e37f59308484874 to your computer and use it in GitHub Desktop.
Containers in 3 weeks - Set up

Containers in 3 weeks — Week 1/2 setup

Installation

You will need Docker installed! Here is a link to get you started. Proceed after you are done installing.

Warm up your engines!

Using the command (bash) prompt:

docker image pull alpine:3.17;
docker image pull ubuntu:22.04;
docker image pull jenkins/jenkins:lts-jdk11;
docker image pull nginx:1.25.1-alpine;

The final test

Once again, at the command prompt:

> docker container run --rm -d --name myjenkins -p 8080:8080 jenkins/jenkins:lts-jdk11;
> docker container logs -f myjenkins;

You should see the Jenkins logs flowing by eventually settling with the following:

Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
Apr 03, 2023 11:26:01 PM Main deleteWinstoneTempContents
WARNING: Failed to delete the temporary Winstone file /tmp/winstone/jenkins.war
Apr 03, 2023 11:26:01 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Logging initialized @481ms
Apr 03, 2023 11:26:01 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Apr 03, 2023 11:26:02 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Empty contextPath
# truncated for brevity

Visit http://localhost:8080 and see if you see the Jenkins login page. If you do, you are all set to go!!

# ctrl-c to break out of the logs
docker container stop myjenkins;

Woot!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment