Compare commits
No commits in common. "c8c94f7771e9ae292f97af1aca5ea3130a4762f2" and "cd2631d74c1cf4bfb961ed5a8a5bd953177114b2" have entirely different histories.
c8c94f7771
...
cd2631d74c
53
.drone.yml
Normal file
53
.drone.yml
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: build-docker-image
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: docker:dind
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache make bash git
|
||||||
|
- make build
|
||||||
|
|
||||||
|
- name: push
|
||||||
|
image: docker:dind
|
||||||
|
environment:
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache make bash git
|
||||||
|
- echo "$DOCKER_PASSWORD" | docker login --username=$DOCKER_USERNAME --password-stdin git.query.consul
|
||||||
|
- make push
|
||||||
|
|
||||||
|
- name: clean
|
||||||
|
image: docker:dind
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache make bash git
|
||||||
|
- make clean
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
@ -1,26 +0,0 @@
|
|||||||
name: Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: almalinux-8
|
|
||||||
container:
|
|
||||||
image: git.query.consul/unkin/almalinux8:latest
|
|
||||||
options: --privileged
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Set up environment
|
|
||||||
run: |
|
|
||||||
dnf install -y yum-utils
|
|
||||||
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
|
|
||||||
dnf module enable -y nodejs:20
|
|
||||||
dnf install -y docker-ce-cli make bash git nodejs
|
|
||||||
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Build Docker Image
|
|
||||||
run: |
|
|
||||||
make build
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
name: Deploy
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: almalinux-8
|
|
||||||
container:
|
|
||||||
image: git.query.consul/unkin/almalinux8:latest
|
|
||||||
options: --privileged
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Set up environment
|
|
||||||
run: |
|
|
||||||
dnf install -y yum-utils
|
|
||||||
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
|
|
||||||
dnf module enable -y nodejs:20
|
|
||||||
dnf install -y docker-ce-cli make bash git nodejs
|
|
||||||
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Build Docker Image
|
|
||||||
run: |
|
|
||||||
make build
|
|
||||||
|
|
||||||
- name: Log in to Docker
|
|
||||||
env:
|
|
||||||
UPLOAD_USER: ${{ secrets.UPLOAD_USER }}
|
|
||||||
UPLOAD_PASS: ${{ secrets.UPLOAD_PASS }}
|
|
||||||
run: |
|
|
||||||
echo "$UPLOAD_PASS" | docker login --username=$UPLOAD_USER --password-stdin git.query.consul
|
|
||||||
|
|
||||||
- name: Push Docker Image
|
|
||||||
run: |
|
|
||||||
make push
|
|
||||||
@ -17,8 +17,6 @@ RUN dnf clean all && \
|
|||||||
|
|
||||||
# Update the system and install required packages
|
# Update the system and install required packages
|
||||||
RUN dnf update -y && \
|
RUN dnf update -y && \
|
||||||
dnf install -y curl git
|
dnf install -y curl git && \
|
||||||
|
dnf clean all && \
|
||||||
# Cleanup
|
|
||||||
RUN dnf clean all && \
|
|
||||||
rm -rf /var/cache/dnf
|
rm -rf /var/cache/dnf
|
||||||
|
|||||||
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
[](https://droneci.query.consul/unkin/docker-almalinux-base)
|
[](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 CI tasks to ensure consistent and reliable Docker image builds.
|
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.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user