Showing posts with label docker. Show all posts
Showing posts with label docker. Show all posts

Sunday, 2 April 2017

finding the docker mount volume location - running jenkins in a container

Finding the Docker mount volume location, running Jenkins in a container


I love running jenkins in a container, no installation locally, and it really is awesome to just spin up a docker container image and run a build process.

I had setup a jenkins container around 5 months ago running on docker and forgot the password and the path to the mounted volume. Here's how you go about getting the volume so you can reset the password

Locate the volume  


I configured my jenkins to use a mounted volume, and had no idea where it was. This is a lazy manner of getting the path - it will be under the mount section:

docker inspect my-jenkins | grep "Source"
Update: this is the proper way to get the mount source:
docker inspect --format='{{range .Mounts}}{{ .Source}}{{end}}'

and locate the folder locally, mine was at
/var/lib/docker/volumes/e6bc1cd088645a4f5b7f69c0ba00951b159b0ccf552cf02bd31c85d64cb35626/_data

Now that I have the mount path I can change the security attribute to false, log in and configure the security again, but at least I am back in.



Docker makes playing with software in images simple; in this way even though I have java installed locally I don't need to spin up and keep jenkins running all the time, just when I want to spin it up.

Cheers
Quintes

Connect with me on LinkedIn or Twitter






Wednesday, 29 March 2017

Getting started with container technologies

Getting started with container technologies


Containers and the tooling around it is currently grabbing the attention of many people; developers can containerize a whole application and deliver it to run without needing to install anything on the host. Ops don't have to set anything up (on the hosting server that is, so no application installs) and management will love the promises of easier deployment, faster delivery and more agile release management techniques.

Tooling  


Everyone has heard of Docker, the most well known container runtime, but there are numerous methods of managing, running and orchestrating containers. I'll be looking at them in depth and providing notes as part of blog entries as part of my learning, and hopefully they provide some use to you.

The options for running containers are
1. Docker
2. Containerd,
3. runc, and
4. rkt

Docker was easy to pick up - I've been playing with it since the last quarter 2016 - though I am sure production implementations would need more time and administrative effort around availability and discovery.  I've been wanting to spend time around rkt and will write up any useful notes as I go.

Running containers, either in docker images or App Container Images can be run and orchestrated in clustered environments using a number of technologies better suited to operation and deployment. I will try to introduce those as part of this blog series as well.

Cheers
Quintes

Connect with me on LinkedIn or Twitter