-
Notifications
You must be signed in to change notification settings - Fork 18
Create CRA Docker Image
This page describes how to Dockerize the CRA workers so that you can deploy them on a Kubernetes cluster. Once this is done, you can deploy CRA on Kubernetes following the instructions here.
-
Install Docker for Windows. In case of Windows 10, make sure that you enable Hyper-V for use as in here.
-
Make sure that the Docker daemon is running on your dev machine. Right-click on the Whale (in the taskbar) and choose "Switch to Windows containers". You may need to restart the computer. Note - if you restart it might default back to Linux, so "Switch to Windows containers" again if necessary.
-
Open a command prompt and change directory to
src\CRA.Worker
-
Run the following command
docker build -f Dockerfile-debug -t cra-0.1-debug .
Here, 0.1 is the version of CRA you are building, and debug denotes that this is the Debug build (you may build the docker image for Release builds similarly).
-
Login to a registry where you want to push the newly built image. Docker login command defaults to hub.docker.com if you do not specify a private registry URL. Here, we assume that your Docker account name is
mydockeraccount
.docker login -u mydockeraccount -p <your docker hub password>
-
Push the CRA docker image (
cra-0.1-debug
from above) to Dockerhub.docker push mydockeraccount/cra-0.1-debug .
After these steps, there is a repository created in your account in Dockerhub. You can verify online by logging into your Dockerhub account. For public Docker Hub registries, other users can simply pull them directly by specifying the name of the image (mydockeraccount/cra-0.1-debug).
You can now deploy CRA on Kubernetes following the instructions here.