Skip to content

This Bash script checks whether a given Docker image exists locally. If not, it builds the image from a specified directory containing a `Dockerfile`. Useful for CI/CD pipelines, local development automation, and repeatable builds

Notifications You must be signed in to change notification settings

lucianovk/Docker-Image-Builder-Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”§ Docker Image Builder Script

This Bash script checks whether a given Docker image exists locally.
If not, it builds the image from a specified directory containing a Dockerfile.

Useful for CI/CD pipelines, local development automation, and repeatable builds.


πŸ“¦ Requirements

  • Docker installed and accessible in the system $PATH
  • Bash (Unix-like shell)

πŸš€ Usage

./build_if_needed.sh <image-name[:tag]> <dockerfile-directory>

About

This Bash script checks whether a given Docker image exists locally. If not, it builds the image from a specified directory containing a `Dockerfile`. Useful for CI/CD pipelines, local development automation, and repeatable builds

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages