The Ortus BlogBox

"Ortus: A rise, beginning, coming into being, born, the origin!"

 

 

Category Filtering: 'roadshow'

 

CONTAINERS2017 - Removing Containers

Luis Majano
Sep 14, 2017

 

The Docker CLI has an extensive suite of commands built-in and it can be painful to remember all of them. So as part of our containers roadshow, we will be blogging about useful tips and tricks for working with containers. We all make mistakes and we all need to be able remove containers from time to time. So let's go ahead and start!

Remove one or more specific containers

Use the docker ps command with the -a flag to locate the name/ID of the containers you want to remove:

# list
docker ps -a

# remove
docker rm ID/nameID/name

Remove Container Upon Exit

If you want to cleanup after yourself, then you can automatically delete a container once it exists from runnable operation using the docker run --rm command.

docker run --rm image_name

Remove All Exited Containers

You can locate containers using docker ps -a and filter them by their status: created, restarting, running, paused, or exited. To review the list of exited containers, use the -f flag to filter based on status. When you've verified you want to remove those containers, using -q to pass the IDs to the docker rm command.

docker ps -a -f status=exited
docker rm $(docker ps -a -f status=exited -q)

Remove Containers Using More Than 1 Filter

Docker filters can be combined by repeating the filter flag with an additional value.

docker ps -a -f status=exited -f status=created
docker rm $(docker ps -a -f status=exited -f status=created -q)

Remove Containers According to Patterns

You can find all the containers that match a pattern using a combination of docker ps and grep. When you're satisfied that you have the list you want to delete, you can use awk and xargs to supply the ID to docker rmi. Please note this will only work on unix based systems.

docker ps -a |  grep "pattern”
docker ps -a | grep "pattern" | awk '{print $3}' | xargs docker rmi

Stop and remove all containers

You can review the containers on your system with docker ps. Adding the -a flag will show all containers. Then you can get funky and pass them to the stop or rm commands.

docker ps -a
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
Docker, RoadShow 0

CONTAINERS2017 - Removing Docker Images

Luis Majano
Sep 12, 2017

 

We all need some help from time to time. The Docker CLI has an extensive suite of commands built-in and it can be painful to remember all of them. So as part of our containers roadshow, we will be blogging about useful tips and tricks for working with containers. We all make mistakes and we all need to be able remove images from time to time. So let's go ahead and start!

Remove one or more specific images

By using the docker images command with the -a flag, you can list all the images in the system by leveraging the image ID. Here is some example output:

$ docker images -a
REPOSITORY                         TAG                    IMAGE ID            CREATED             SIZE
<none>                             <none>                 178eecd0d35a        3 days ago          64MB
nginx_nginx                        latest                 56dab2b8fae4        3 days ago          64MB
<none>                             <none>                 e80436974f2f        3 days ago          64MB
<none>                             <none>                 bea15fa1eee1        3 days ago          64MB

Once you have located the image you want to wipe away pass the ID to the docker rmi command:

docker rmi ImageID

Removing Dangling Images

Please remember that docker images consist of multiple software layers. Dangling images are layers that have no relationships to any images or containers. Basically, orphaned images which still can cosume plenty of space. They can be located by adding the -f with a value of dangling=true to the docker images command. You can pass the -q flag to get a listing of image ID's and pass that to the rmi command for a nice concatenated removal:

# List
docker images -f dangling=true

# Remove them all baby
docker rmi $(docker images -f dangling=true -q)

Removing Images According to Patterns

You can get fancy by leveraging the grep command (in unix only) and the docker images command to get a nice listing according to patterns. Once you are golden with the images you want, you can then further pipe the command to awk to clean up the buffer and finally pass them to the rmi command.

# listing
docker ps -a |  grep "pattern"

#removing 
docker images | grep "pattern" | awk '{print $1}' | xargs docker rm

Removing All Images

Ok, we want to start fresh and cleany and minty fresh. Just use the following to remove all images

docker rmi $(docker images -a -q)

Don't drink and rmi.

Docker, RoadShow 1

CONTAINERS2017 - Your first Docker Compose - Part 2

Gavin Pickin
Sep 07, 2017

 

The Ortus Solution roadshow continues, we'll keep bringing you free webinars and blog posts through the month of September. If you have tuned in already, you might have learned what Docker is, why you could / should use it, and then maybe a little of how to use it. If the first part of this mini series on First Docker Compose we saw how ou can spin up a Docker container pretty easily, with a command or two, but usually, we work with multiple servers. Docker-Compose makes that easier, it doesn't have to be too confusing. We are building on top of part 1, where we spun up a CFML Server container by itself, and then we added a simple MySQL Server. Next we're going to add Nginx in front of the CFML Server container, and then we'll do more with the MySQL server, like add a database, and then seed it ( preload it ) with data to get things rolling. That is what we're going to look at today.

CommandBox, Docker, Ortus University, RoadShow 0

CONTAINERS2017 - Your first Docker Compose

Gavin Pickin
Sep 05, 2017

 

The roadshow has just started, and you might have learned what Docker is, why you could / should use it, and then maybe a little of how to use it. You can spin up a Docker container pretty easily, with a command or two, but usually, we work with multiple servers. Configuring that might be confusing at first... you might wonder, if i spin up 3 containers, how do they know how to find each other, and other questions like this, are easily solved, with Compose files. That is what we're going to look at today.

CommandBox, Docker, RoadShow, Tutorials 0

CONTAINERS2017 - Docker Roadshow coming in September!

Brad Wood
Aug 29, 2017

 

There's a brand new thing out and it's called Docker.  Maybe you've heard of it? We think it's pretty cool. Oh, who are we kidding?  Docker has been around for a while now and it's becoming HUGE!  Local development is getting more powerful.  Server deployment is becoming more ubiquitous.  And cloud hosts everywhere are consolidating on one container standard.  Docker has been the "next big thing" for a few years now and this has led to a lot of questions from ColdFusion developers and sys admins.  

  • What the heck is Docker?
  • How is it different from just running VMs?
  • How do I deploy it?
  • Is it secure?
  • What are the tradeoffs?

We've been fully embracing Docker and feverishly building tools and guides to help CFers understand and use it.  It felt like the right time to devote an entire month of love to our new best friend, Docker and how it can help you in multiple areas of your development and deployment workflow.  

Docker RoadShow

That's why we've carved out the month of September to lay down a solid foundation for you CF people who are Docker-curious to dig in and find out what this is all about as well as get hands-on examples of how to use Docker and even learn advanced techniques that would otherwise take you hours and hours of googling to understand.  We will feature a series of blog posts all month long so keep an eye right here on the Ortus blog.  We'll also be featuring a recorded webinar every week presented by team Ortus as well as Docker-savvy friends from around the world.

Docker Webinars

Here's a rundown of our Docker webinars that we'll be hosting.  Each of these will happen at 11am Central time.

  • 9/01 11:00 am CST - Intro to Containers with Mark Drew
  • 9/08 11:00 am CST - Containerizing ContentBox CMS with Luis Majano 
  • 9/15 11:00 am CST - Configuring your Containers with CommandBox & CFConfig with Brad Wood
  • 9/22 11:00 am CST - Box Microservices with Jon Clausen
  • 9/29 11:00 am CST - Start playing with Docker with Gavin Pickin

Sign Me Up!

To register for one or more of the webinars, please signup here:

https://zoom.us/meeting/register/90aba9d358d70b17cde7dc3c8da9331e

We're using Zoom this year and can fit 100 people in each meeting, so please sign up early!  We will record each session and post them afterwards.

And if you want a nice place to keep track of each of the blog posts and webinars as they happen, we've also created this page to help track all of our CFML Docker content!  We'll update it as the roadshow gets underway.

https://www.ortussolutions.com/events/container-roadshow-2017

This is your chance to come see what Docker is all about and learn some stuff to take back and impress your team!

 

 

Docker, Events, RoadShow, Training 0

CBCMS2016 - Building your Own Admin Modules - Part 4 - Extending ContentBox 3

Gavin Pickin
Aug 11, 2016

 

Ready for part 4? Yes, part 4. We continue our small walkthrough of building your own Admin Module in ContentBox 3. The last few blog posts we learned the minimum requirements for a new module, to be controlled from inside of ContentBox. Then we learned how to add a handler and a view, and how to access the module from the front end entry point, and through the ContentBox admin entrypoint. In the last blog post in this mini series, we looked at adding a Submenu for your module, to an existing top level Menu item inside of the ContentBox admin. This blog post is going to show you how to add your very own top level Menu item, give it an icon, set permissions, and then add Submenu items to access your module.

ContentBox CMS, Modules, RoadShow, Tutorials 0

CBCMS2016 - Building your Own Admin Modules - Part 3 - Extending ContentBox 3

Gavin Pickin
Aug 09, 2016

 

In previous posts, we learned how to create a module inside of ContentBox, and then we added a handler and view so we could view the module behind the security of the login, but having an admin module, without menu items, is fairly silly ( usually ). In this blog post, we'll learn how you can add Submenu items to existing menus, like the Modules Main Menu.

ContentBox CMS, Modules, RoadShow, Tutorials 0

CBCMS2016 - Building your Own Admin Modules - Part 2 - Extending ContentBox 3

Gavin Pickin
Jul 29, 2016

 

In our last post, we started building an Admin Module. This process isn't actually that difficult or long, but we have broken it into separate blog posts to make it easier to read each piece. We have built our basic ModuleConfig.cfc, now we need to build an event handler and view, so the default action when you hit your new module have something visible. Our module was called mySecrets, so lets move on.

ContentBox CMS, Modules, RoadShow, Tutorials 0

CBCMS2016 - Building your Own Admin Modules - Part 1 - Extending ContentBox 3

Gavin Pickin
Jul 27, 2016

 

In previous posts, we looked at how to extend ContentBox 3 with ColdBox Modules, installing from Forgebox with CommandBox, or creating your own. In this post, we're going to look at how you can create your own Admin Modules, add Menu Items into the Admin Interface, use ContentBox admin Users and Permissions instead of building your own security by extending ContentBox.

ContentBox CMS, Modules, RoadShow, Tutorials 0

CBCMS2016 - ContentBox Modules Deep Dive - What we'll cover in the webinar

Gavin Pickin
Jul 25, 2016

 

Friday, July 29th is the last of our webinars in our ContentBox Roadshow, which has been pumping out blog posts and webinars all throughout the month of July. In this last webinar I'm going to do a deep dive into modules, providing a walkthrough on how to create modules, and use them in your ContentBox site, hopefully that sounds interesting, and you'll join us.

Register now for free - get reminders and all of the recording links.

ContentBox CMS, Modules, RoadShow 0
1 2 3 >>