Updating your rippled Docker Container

Wietse Wind
Feb 21, 2018 · 4 min read

If you operate a validator or rippled Docker Container (howto) the upgrade process is pretty easy. I intend to update the Docker Hub container images to the most recent rippled version ASAP, so all you have to do is re-create your container based on the newest image.

If you used the Github repositories (docker-rippled, docker-rippled-validator) there are instructions at the end of this article.

Docker Hub

If you just followed the instructions in the Howto and created a container, the old container image was fetched from the Docker Hub automatically. By now, the same image containing a newer version of rippled is waiting for you at the Docker Hub.

The steps below assume we are talking about the validator container, rippledvalidator — if you are running the rippled image instead of the rippledvalidator, please replace rippledvalidator in all the commands below for rippled.

If you named your container differently (my howto assumed the --name of the container to be either rippledvalidator or rippled, you can check your container name with the command:

Image for post
Image for post
The last column will show your container name

1. Check the file mounts of our existing docker container (the -v argument)

When you created the container, you probably used a command containing a folder mapping (from the host to the docker container). This is where your rippled config and keys are stored. We are going to remove the container, and when we re-create our container (step 6) we want to use our existing config and keys. To be sure, we are going to check the path(s) mapped to the container:

Image for post
Image for post
The mapped folders (mounts) are displayed

Looks like (in my case) I specified the path below using the -v option:

2. Check the mapped ports of our existing docker container (the -p argument)

Let’s check the mapped ports (from our Docker host to the container):

In this case we see ...:51235->51235 in the output (for our rippledvalidator container)

Image for post
Image for post

Looks like I specified a portmap using the -p option:

3. Stop the existing container

Now we know the -v and the -p argument(s) we have to use when we are going to re-create our docker container (step 6), we can stop our container:

Stopping the container will take 10~60 seconds; rippled wil gracefully close all connections and write remaining information to the database.

4. Remove the existing container

Let’s remove the container:

5. Remove the existing docker image

If we would re-create our container, Docker would just reuse our old container image (containing rippled 0.81.0). We are going to remove our image, so Docker will download the newest version from the Docker Hub:

docker rm = remove container, docker rmi = remove image

6. Re-create the container. Docker will download the most recent image containing rippled

We will now combine the information from step 1 and step 2, and create a new container. We will mount the folder with our config, keys (and in case of the rippled-image: database) again. The command in my howto is:

PLEASE NOTE! Replace /My/Local/Disk/RippledKeystore/ for the path step 1. showed. This is probably /keystore/. This line will then be:
-v /keystore/:/keystore/

You can update this command with your own ports and paths from step 1 and step 2. If you want to map multiple ports and/or multiple folders, just use the -p and/or -v arguments multiple times.

Now your new container is running, you can check the rippled-version with this command:

Image for post
Image for post
Looks like (in the example above) we are now running 0.90.0 :)

Github

If you cloned the docker-rippled-validator or the docker-rippled Github repository and you used the go/build and go/up commands these are your steps to update.

Use your terminal to go to the folder the repository is checked out, and fetch the most recent version:

Now take the container down using the script in the repository:

Since the go/build script removes the existing image, you can just build a new image; the newest rippled-version will automatically download for your new build:

Now launch your container based on the new image:

Now your new container is running, you can check the rippled-version with this command:

Image for post
Image for post
Looks like (in the example above) we are now running 0.90.0 :)

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store