A CLI tool build in Golang to backing up and restoring Postgres databases
232
This repository contains the Guard CLI, a Go-based command-line tool packaged as a Docker container.
docker pull annany/guard:latest
If you want to build the image from the source:
docker build -t annany/guard:latest .
To run the container in interactive mode:
docker run -it annany/guard:latest /bin/bash
To run the CLI tool directly:
docker run --rm annany/guard:latest
--rm: Removes the container after execution.To keep the container running even after exiting:
docker run -dit --name guard-container annany/guard:latest /bin/bash
-d: Runs in detached mode (background).-i: Keeps STDIN open.-t: Allocates a TTY session.--name guard-container: Assigns a name to the container.Reattach later using:
docker exec -it guard-container /bin/bash
To ensure logs and data persist across runs, use volumes:
docker run -dit --name guard-container -v $(pwd)/data:/app/data annany/guard:latest /bin/bash
./data on your local machine to /app/data inside the container.To upload your built image to Docker Hub:
docker login
docker tag annany/guard:latest annany/guard:1.0
docker push annany/guard:1.0
To stop the running container:
docker stop guard-container
To remove it completely:
docker rm guard-container
docker logs guard-container
docker ps
docker ps -a
This project is licensed under the MIT License.
Content type
Image
Digest
sha256:f4fa069c5…
Size
14.7 MB
Last updated
over 1 year ago
docker pull annany/guard