Nucleus .Net Core CMS

Set up Nucleus in Docker

See also:

Docker is an open-source platform that automates the deployment, scaling, and management of applications inside lightweight, portable containers. Containers allow developers to package an application with all of its dependencies and configurations into a single, consistent unit that can run anywhere, whether on a developer's local machine, on-premises servers, or in the cloud.

Running Nucleus in a Docker container is useful for testing, evaluation or even in some production scenarios. Kubernetes is an open source system for automating deployment, scaling, and management of containerized applications and is often used in production environments.

Docker Image

You can download a pre-built Docker image for Nucleus, or you can create your own Docker container using the Nucleus install set for Linux.

Download Pre-built Docker Image

  1. Download a Docker image from https://www.nucleus-cms.com/downloads/
  2. Load the image into Docker. Substitute the version number that you downloaded for the version numbers in the command below:
    docker image load -i Nucleus.3.0.0.5.Docker-linux_x64.tar
    
  3. Create a container. See Create a Container below for details.

Create your own Docker Image

If you want to customize your Nucleus installation or if you want to use a different version of Linux or Nucleus, you can create your own Docker container.

  1. Download the [Nucleus install set for Linux] from https://www.nucleus-cms.com/downloads/.
  2. Download the Linux installer shell script.
  3. Copy both files to a folder, and create a file named dockerfile in the same folder. Replace the version number 3.0.0.0 in the sample docker file below with the appropriate version.
FROM ubuntu:24.10

ADD Nucleus.3.0.0.0`.Install-linux_x64.zip /home/ubuntu
ADD nucleus-install.sh /home/ubuntu

# you can set your environment name here, e.g. Development, Testing, Staging, Production
ENV ASPNETCORE_ENVIRONMENT=Production

# install Nucleus
WORKDIR /home/ubuntu
RUN bash nucleus-install.sh --auto-install true --usesystemd false

# open ports
EXPOSE 5000

# run nucleus
WORKDIR /home/nucleus/app
CMD ["dotnet", "bin/Nucleus.Web.dll"]

Create your Docker image

docker build -f dockerfile -t nucleus:3.0.0.0 .

The dot at the end of the command is required. Replace "3.0.0.0" with the appropriate version number to tag your image correctly.

Docker creates and stores your image in its own local repository.

Create a Container

To run Nucleus in Docker, you need to create a container from the image you built or downloaded. Use the following command to create a container named "nucleus" from the image you created or downloaded. Substitute the the version number or tag that you used to create the image:

docker run --publish 8090:5000 --detach --restart=unless-stopped --name nucleus nucleus:3.0.0.0

You can change the port used to access Nucleus (8090) in the command above. Once you have created your Docker container, you can delete the installation zip file, installer script and dockerfile if you want to. Make sure to change the version tag "3.0.0.0" to the appropriate version number of your Nucleus image.

Run the Container

The docker run command above will automatically start the container. If it is stopped, you can start it again with this command: docker container start nucleus

You can also use Docker Desktop to run and stop the container.

Run Nucleus

Browse to http://localhost:8090. The first time you browse to Nucleus, it will run the Setup Wizard.

Return to the Installing Nucleus page to continue.