
You need to stop and rm (remove) the container before you can remove the image. This means that the image you are trying to remove is being used by a container and can not be removed. If you get the following or similar error: Error response from daemon: conflict: unable to remove repository reference "projectz-svc" (must force) - container 6b1b99cc899c is using its referenced image 6b9eadff19ae You can skip this step if you do not have the projectz-svc and projectz-ui on your local machine. We’ll use the remove image (rmi) command. Let’s first remove projectz-svc and projectz-ui images. If you do not see the above images, that’s okay, we are going to recreate them now. You can see that I have the nginx, projectz-svc, projectz-ui, and node images on my machine. Run the following command to see a list of images. Let’s take a look at the list of Docker images we have locally on our machine. If you have SSH keys set up for your github account, you can use the SSH URLs instead. (Remember to substitute your GitHub ID for in the above commands) Use these URLs to clone the repo to your local machine. Back in your browser click the green “Clone or download” button and copy the URL. Now let’s clone the two repositories you just forked above. Let’s create a directory where we will clone our repos and do all our work in. Open a terminal on your local development machine and navigate to wherever you work on your source code. Repeat the processes for the pmckeetx/projectz-svc repository. Open your favorite browser and navigate to the pmckeetx/projectz-ui repository.Ĭreate a copy of the repo in your GitHub account by clicking the “Fork” button in the top right corner. Now let’s build our images and push them to the repos we created above. For this article, I refactored our project and broke them into two different git repositories to more align with today’s microservices world. Structure Projectįor simplicity in part 1 of this series, we only had one git repository. We now have two Docker Hub Repositories setup. Use the following settings to do so:ĭescription: This is our super awesome services for the Projectz applicationĮxcellent. Follow the previous steps and create a new repository for the projectz-services application. We also need a repository for your services application. As expected, we do not have any tags at this time because we have not pushed an image to our repository yet. This is the repository screen where we can manage tags, builds, collaborators, webhooks, and visibility settings.Ĭlick on the Tags tab. Your repository will be created and you will be taken to the General tab of your new repository. Go ahead and click the “Create” button to create a new repository. So, for now, do not connect to a source control system.

You have the option to choose GitHub or Bitbucket but we’ll be doing this later in the article. We can also connect your repository to a source control system. Let’s keep the repository Public for now. We also have the ability to make the repository Public or Private. Type projectz-ui in the name field and a short description such as: This is our super awesome UI for the Projectz application. Now let’s give our repository a name and description. This will create the repository for your Docker ID. You can create repositories for your account or for an organization. You should now see the “Create Repository” screen. Once you’re logged in, let’s create a couple of repos where we will push our images to.Ĭlick on “Repositories” in the main navigation bar and then click the “Create Repository” button at the top of the screen.

This first thing you will want to do is create a Docker ID, if you do not already have one, and log in to Hub. Docker Hubĭocker Hub is the easiest way to create, manage, and ship your team’s images to your cloud environments whether on-premises or into a public cloud.
DOCKER REMOVE CONTAINER KEEP LOGS HOW TO
In this article, we’ll walk through deploying our code to the cloud, how to use Docker Hub to build our images when we push to GitHub and how to use Docker Hub to automate running tests.

In part 1 of this series, we took a look at installing Docker Desktop, building images, configuring our builds to use build arguments, running our application in containers, and finally, we took a look at how Docker Compose helps in this process.
DOCKER REMOVE CONTAINER KEEP LOGS SERIES
Part 2 in the series on Using Docker Desktop and Docker Hub Together Introduction
