Ensure the following:
- Docker is installed and running
- Docker Hub account is active
- A valid
Dockerfileexists in your project directory - You have access to
gemini-deployment.yml(Kubernetes manifest) - Docker Hub Personal Access Token (PAT) generated if 2FA is enabled
- Go to: https://app.docker.com/settings/personal-access-tokens
- Create a New Access Token with Read, write, and delete permissions
- Copy the token securely
Login via terminal:
docker login -u <your-dockerhub-username>Paste your access token when prompted for password.
From the directory containing the Dockerfile, build your image:
docker build -t gemini-clone .This creates a local image with the name gemini-clone.
Tag your local image to match the format required by Docker Hub:
docker tag gemini-clone <your-dockerhub-username>/gemini-clone:latestExample:
docker tag gemini-clone amitabhsoni/gemini-clone:latestdocker push <your-dockerhub-username>/gemini-clone:latestExample:
docker push amitabhsoni/gemini-clone:latestOpen the deployment file and set the container image to the pushed version:
containers:
- name: gemini
image: <existing-docker-image>Example:
containers:
- name: gemini
image: <your-dockerhub-username>/<docker-image-name>:<image-version>