DEV Community

Jimmy Kane
Jimmy Kane

Posted on

HAXCMS in Docker

What is Docker

Docker is a platform as a service(PaaS) product that containerizes applications with only necessary dependencies. As a result, no matter what OS runs the container, it will behave the same. Using a tool such as Kubernetes allows for multiple containers and thereby instances of the same application to be deployed at once. Docker allows containers to be tagged allowed for versioning and additional metadata to be saved. In production environments, docker is used to create containers but Kubernetes is used to deploy containers.

How to Install Docker for Mac

  1. Go to https://www.docker.com/products/docker-desktop and download Docker Desktop
  2. Move Docker Desktop to the Applications Folder

Image description

  1. Close the Installer
  2. Open Docker Desktop
    You may get the following prompt, just select open and continue
    Image description

  3. Create a Docker account and sign in.

Building an Image and Running Container

  1. Go the HAXCMS GitHub repo and download it.
  2. Open VSCode to the repo or terminal and navigate to the directory
  3. Build the docker repo and name it by using the following command docker build . -t <Insert Wanted Name Here> Image description
  4. Run the container by using the 'docker run -dp 80:80 '
  5. Open browser to localhost:80 Image description Image description

How to stop container

  1. Open Terminal
  2. Run docker ps Image description
  3. Run docker stop <containerID> Image description

Top comments (0)