Skip to content

Commit

Permalink
3.0 支持部署节点容器化 (#362)
Browse files Browse the repository at this point in the history
Change-Id: I07a71897a30d76ad6d62413679f634cfe28fc698
  • Loading branch information
caoyingjunz authored Nov 19, 2023
1 parent f4d7a80 commit 4a0acd7
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Build kubez-ansible image

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Login in dockerhub
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
username: jacky06
password: jacky06jacky06

- name: Build and push kubez-ansible image
run: make push
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ubuntu:20.04

WORKDIR /kubez-ansible
COPY . .

RUN apt-get update
RUN apt install -y git python3-pip ansible && \
pip3 install /kubez-ansible && \
apt remove -y git python3-pip && \
apt-get clean
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.PHONY: run build image push clean

tag = v3.0.0
releaseName = kubez-ansible
dockerhubUser = jacky06

ALL: run

image:
docker build -t $(dockerhubUser)/$(releaseName):$(tag) .

push: image
docker push $(dockerhubUser)/$(releaseName):$(tag)
2 changes: 0 additions & 2 deletions docker/Dockerfile

This file was deleted.

0 comments on commit 4a0acd7

Please sign in to comment.