Skip to content

Commit 45c895a

Browse files
committed
Create devops-tools image.
1 parent 2249811 commit 45c895a

File tree

7 files changed

+84
-0
lines changed

7 files changed

+84
-0
lines changed

devops-tools/Dockerfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM zcloudws/ubuntu-base:22.04
2+
3+
USER root
4+
5+
RUN apt-get update && apt-get install -y dnsutils iputils-ping iputils-tracepath mtr nmap git wget \
6+
&& rm -rf /var/lib/apt/lists/*
7+
8+
USER zcloud

devops-tools/README.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# DevOps tools
2+
3+
### Usage example
4+
5+
```bash
6+
docker run --rm --name devops-tools -it zcloudws/devops-tools:latest
7+
```
8+
9+
### User information:
10+
11+
- **User**: zcloud
12+
- **Group**: zcloud
13+
- **UID**: 65123
14+
- **GID**: 65123
15+
16+
### Packages:
17+
18+
- `curl`: from ubuntu-base
19+
- `nano`: from ubuntu-base
20+
- `unzip`: from ubuntu-base
21+
- `dnsutils`
22+
- `iputils-ping`
23+
- `iputils-tracepath`
24+
- `mtr`
25+
- `nmap`
26+
- `git`
27+
- `wget`
28+
29+
_by [zCloud](https://www.zcloud.ws)_

devops-tools/build.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
set -e -x
3+
4+
_VERSION=${1}
5+
6+
source config.sh
7+
8+
if [ "x${_VERSION}" != "x" ]; then
9+
export IMAGE_TAG="${_VERSION}"
10+
fi
11+
12+
export IMAGE="${IMAGE_REPO}/${IMAGE_NAME}:${IMAGE_TAG}"
13+
14+
docker build -t "${IMAGE}" .

devops-tools/config.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export IMAGE_REPO="zcloudws"
2+
export IMAGE_NAME="devops-tools"
3+
export IMAGE_TAG="1.0.0"
4+
5+

devops-tools/hooks/build

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
echo "### DOCKER_TAG ===> $DOCKER_TAG"
3+
4+
./build.sh "${DOCKER_TAG}"
5+
6+
7+
8+

devops-tools/hooks/push

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
echo "### DOCKER_TAG ===> $DOCKER_TAG"
3+
4+
./push.sh "${DOCKER_TAG}"
5+
6+
7+
8+

devops-tools/push.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
set -e -x
3+
4+
source config.sh
5+
6+
export IMAGE="${IMAGE_REPO}/${IMAGE_NAME}:${IMAGE_TAG}"
7+
8+
../scripts/push.sh
9+
10+
export README_BODY="{\"full_description\": \"$(cat README.md | sed -z 's/\n/\\n/g' | sed -z 's/"/\\"/g')\"}"
11+
../scripts/update-readme.sh
12+

0 commit comments

Comments
 (0)