Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Node Cookbook

You're reading from   Node Cookbook Actionable solutions for the full spectrum of Node.js 8 development

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781785880087
Length 656 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Matteo Collina Matteo Collina
Author Profile Icon Matteo Collina
Matteo Collina
David Mark Clements David Mark Clements
Author Profile Icon David Mark Clements
David Mark Clements
Peter Elger Peter Elger
Author Profile Icon Peter Elger
Peter Elger
Mathias Buus Madsen Mathias Buus Madsen
Author Profile Icon Mathias Buus Madsen
Mathias Buus Madsen
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Title Page
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
About nearForm
Preface
1. Debugging process* FREE CHAPTER 2. Writing Modules 3. Coordinating I/O 4. Using Streams 5. Wielding Web Protocols 6. Persisting to Databases 7. Working with Web Frameworks 8. Dealing with Security 9. Optimizing Performance 10. Building Microservice Systems 11. Deploying Node.js

Running a Docker registry


In this recipe, we are going to publish our adderservice container that we in the last recipe to our own private Docker registry.

Getting ready

To get setup for this recipe we need to pull the official Docker registry container.

We do this by running the following:

$ docker pull registry

This recipe uses the code from the previous recipe, Building a container for a Node.js process.

If we haven't already done so, we'll need to build the the adderservice image from the previous recipe:

$ cd micro/adderservice
$ docker build -t adderservice 

Finally, we need the openssl command-line tool available, which should be installed with our preferred package manager (for example, brew if we are using a Mac).

How to do it...

Let's start a Docker registry container (we pulled the Docker registry container in the Getting Ready section of this recipe) with the following command:

$ docker run -d -p 5000:5000 --name registry registry:2 

If we now issue a docker ps command, we can see that...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images