Skip to content

Releases: imvickykumar999/docker-django-deploy

v1

13 Jun 10:58

Choose a tag to compare

v1

Push the .tar to GitHub Releases (Advanced)

image

If you'd like to host it for download from GitHub:

gh release create v1 docker-django-deploy.tar --notes "Docker image export"

Then visit your repo’s Releases tab to download the file.

Playit Port Forwarded

13 Jun 10:59

Choose a tag to compare

image

You can download your Docker image as a file (usually a .tar archive). This is useful for:

  • Offline transfers
  • Archiving
  • Sharing without pushing to a registry

🐳 How to Save a Docker Image to a File

To save your docker-django-deploy image:

docker save -o docker-django-deploy.tar ghcr.io/imvickykumar999/docker-django-deploy:latest

This will create a file named docker-django-deploy.tar in your current directory.


🔄 How to Load That Image Elsewhere

To import it on another machine:

docker load -i docker-django-deploy.tar

Then run it like any other image:

docker run -p 8000:8000 docker-django-deploy

📁 Optional: Compress the Image

You can compress it to make it smaller for sharing:

docker save ghcr.io/imvickykumar999/docker-django-deploy:latest | gzip > docker-django-deploy.tar.gz

Load Image Locally

13 Jun 12:29

Choose a tag to compare

image

Full Step-by-Step Process:

  1. Check if the .tar file exists:

    ls
  2. If the .tar file doesn't exist, save the Docker image as a .tar file (replace <image_name> with the name of the Docker image, e.g., docker-django-deploy):

    docker save -o <tar_file> <image_name>
  3. Load the Docker image from the .tar file (replace <tar_file> with the actual file name, e.g., docker-django-deploy.tar):

    docker load -i <tar_file>
  4. Check the running containers (to identify the container name):

    docker ps -a
  5. Inspect the container to find the PID (replace <container_name> with the actual container name, e.g., happy_bartik):

    docker inspect --format '{{.State.Pid}}' <container_name>
  6. Kill the process using the PID (replace <PID> with the actual PID obtained from the previous command):

    sudo kill -9 <PID>
  7. Stop the container (replace <container_name> with the actual container name, e.g., happy_bartik):

    docker stop <container_name>
  8. Rerun the project using the loaded image (replace <image_name> with the actual image name, e.g., docker-django-deploy):

    docker run -p 8000:8000 <image_name>

Example:

  1. Check if .tar file exists:

    ls
  2. Save the image to a .tar file:

    docker save -o docker-django-deploy.tar docker-django-deploy
  3. Load the Docker image from the .tar file:

    docker load -i docker-django-deploy.tar
  4. Check running containers:

    docker ps -a
  5. Inspect the container to find its PID:

    docker inspect --format '{{.State.Pid}}' happy_bartik
  6. Kill the process with the PID:

    sudo kill -9 70630
  7. Stop the container:

    docker stop happy_bartik
  8. Rerun the project:

    docker run -p 8000:8000 docker-django-deploy