diff --git a/.drone.yml b/.drone.yml index 20b6d25..04f6f60 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,10 +4,7 @@ name: build-docker-image steps: - name: build - image: docker:20.10.24-dind - environment: - DOCKER_HOST: tcp://localhost:2375 # Docker daemon - DOCKER_TLS_CERTDIR: '' # Disable TLS to simplify DIND setup + image: docker:20.10.24-cli volumes: - name: dockersock path: /var/run/docker.sock @@ -17,7 +14,8 @@ steps: volumes: - name: dockersock - temp: {} + host: + path: /var/run/docker.sock trigger: event: diff --git a/README.md b/README.md new file mode 100644 index 0000000..6421613 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# Docker Image Build: almalinux base + +[![Build Status](https://droneci.query.consul/api/badges/unkin/docker-almalinux-base/status.svg)](https://droneci.query.consul/unkin/docker-almalinux-base) + +This project provides a reproducible Docker image build process for `almalinux:8.10`, with custom YUM repository configurations and package installations. The build is automated using a `Makefile` and managed via Drone CI to ensure consistent and reliable Docker image builds. + diff --git a/makefile b/makefile index 7544759..bf214f9 100644 --- a/makefile +++ b/makefile @@ -11,13 +11,13 @@ OWNER := unkin # Build the Docker image (without tags) build: - docker build --network=host -t $(IMAGE_NAME) . + docker build --network=host -t $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):$(GIT_COMMIT) . # Tag the Docker image with the Git commit hash, the date, and 'latest' tag: - docker tag $(IMAGE_NAME):latest $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):$(GIT_COMMIT) - docker tag $(IMAGE_NAME):latest $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):$(DATE_TAG) - docker tag $(IMAGE_NAME):latest $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):latest + docker tag $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):latest $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):$(GIT_COMMIT) + docker tag $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):latest $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):$(DATE_TAG) + docker tag $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):latest $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):latest # Push the Docker image to a repository with all tags push: tag