Skip to content
This repository was archived by the owner on Apr 16, 2021. It is now read-only.

Commit c8b906a

Browse files
Version 1.0.0
0 parents  commit c8b906a

File tree

6 files changed

+155
-0
lines changed

6 files changed

+155
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 2
9+
trim_trailing_whitespace = true
10+
11+
[Dockerfile]
12+
indent_size = 4
13+
14+
[*.md]
15+
trim_trailing_whitespace = false

.github/workflows/docker.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@master
12+
13+
- name: Build image
14+
run: docker build --pull -t fireworkweb/k8s .
15+
16+
- name: Test docker images
17+
run: |
18+
docker run fireworkweb/k8s kubectl version --client
19+
docker run fireworkweb/k8s helm version
20+
docker run fireworkweb/k8s aws-iam-authenticator version
21+
docker run fireworkweb/k8s aws --version
22+
docker run fireworkweb/k8s doctl version
23+
24+
- name: Get Tag Name
25+
if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository_owner == fireworkweb }}
26+
uses: olegtarasov/get-tag@v2
27+
28+
- name: Push to Hub
29+
if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository_owner == fireworkweb }}
30+
env:
31+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
32+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
33+
run: |
34+
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
35+
docker tag fireworkweb/k8s fireworkweb/k8s:$GIT_TAG_NAME
36+
docker push fireworkweb/k8s
37+
docker push fireworkweb/k8s:$GIT_TAG_NAME

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.DS_Store
2+
.vscode/

Dockerfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
FROM alpine:3.11
2+
3+
ARG HELM_VERSION=3.1.2
4+
ARG KUBECTL_VERSION=1.18.2
5+
ARG AWS_IAM_AUTH_VERSION=0.5.0
6+
ARG AWSCLI_VERSION=1.18.43
7+
ARG DOCTL_VERSION=1.41.0
8+
9+
WORKDIR /tmp
10+
11+
RUN apk add --update --no-cache --virtual .build-deps \
12+
curl ca-certificates
13+
14+
# Install kubectl
15+
RUN curl -L https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl && \
16+
chmod +x /usr/local/bin/kubectl
17+
18+
# Install helm
19+
RUN curl -L https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz | tar xz && \
20+
mv linux-amd64/helm /usr/local/bin/helm && \
21+
chmod +x /usr/local/bin/helm
22+
23+
# Install aws-iam-authenticator (latest version)
24+
RUN curl -L https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v${AWS_IAM_AUTH_VERSION}/aws-iam-authenticator_${AWS_IAM_AUTH_VERSION}_linux_amd64 \
25+
-o /usr/local/bin/aws-iam-authenticator && \
26+
chmod +x /usr/local/bin/aws-iam-authenticator
27+
28+
# Install awscli
29+
RUN apk add --update --no-cache python3 groff && \
30+
pip3 install --upgrade pip && \
31+
pip3 install awscli==${AWSCLI_VERSION}
32+
33+
# Install doctl
34+
RUN curl -L https://github.com/digitalocean/doctl/releases/download/v${DOCTL_VERSION}/doctl-${DOCTL_VERSION}-linux-amd64.tar.gz | tar xz && \
35+
mv doctl /usr/local/bin/doctl && \
36+
chmod +x /usr/local/bin/doctl
37+
38+
# Cleanup
39+
RUN apk del .build-deps && \
40+
rm -rf /tmp/*
41+
42+
WORKDIR /app

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Firework Web <admin@fireworkweb.com>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# fireworkweb/k8s
2+
3+
Docker image with [Kubernetes](https://kubernetes.io/)-related tools.
4+
5+
Available packages:
6+
7+
- kubectl
8+
- helm
9+
- aws-cli
10+
- do-ctl
11+
12+
## Usage
13+
14+
You can use it running the package you need directly:
15+
16+
```bash
17+
# kubectl
18+
docker run --rm -it fireworkweb/k8s kubectl version --client
19+
20+
# helm
21+
docker run --rm -it fireworkweb/k8s helm version
22+
23+
# aws
24+
docker run --rm -it fireworkweb/k8s aws --version
25+
26+
# doctl
27+
docker run --rm -it fireworkweb/k8s doctl version
28+
```
29+
30+
You can also use some specific tag version. Check [the available tags](https://github.com/fireworkweb/docker-k8s/releases).
31+
32+
```bash
33+
docker run --rm -it fireworkweb/k8s:1.0.0 kubectl version --client
34+
```
35+
36+
## License
37+
38+
[MIT](LICENSE.md)

0 commit comments

Comments
 (0)