Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge branch develop #15

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/base.ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "base-ci"

on:
schedule:
- cron: "00 00 * * *" # 00:00 UTC Everyday
workflow_dispatch:

jobs:
base-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: "[preparation] docker login"
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: "[execution] build the base docker image"
run: |
docker buildx build --output=type=registry -t portainer/base:latest -f base/Dockerfile .
22 changes: 8 additions & 14 deletions kube-shell/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,23 @@ ARG ALPINE=alpine:latest
FROM ${ALPINE} as alpine
ARG ARCH

ARG KUBECTL_VERSION=v1.29.0
ARG HELM_VERSION=v3.13.3

RUN apk add -U --no-cache bash bash-completion curl jq

# Kubectl CLI
ARG KUBECTL_VERSION=v1.21.1
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin/kubectl && \
echo -e 'source /usr/share/bash-completion/bash_completion\nsource <(kubectl completion bash)' >>~/.bashrc

# Helm
ARG HELM_VERSION=v3.6.0
RUN curl -L https://get.helm.sh/helm-${HELM_VERSION}-linux-${ARCH}.tar.gz | tar xvzf - && \
mv ./linux-${ARCH}/helm . && \
chmod +x ./helm && \
mv ./helm /usr/local/bin/helm

# K9s CLI
# ARG K9S_VERSION=v0.24.10
# RUN if [ "${ARCH}" = "amd64" ]; then ARCH=x86_64; fi && \
# curl -L https://github.com/derailed/k9s/releases/download/${K9S_VERSION}/k9s_${K9S_VERSION}_Linux_${ARCH}.tar.gz | tar xvzf - && \
# chmod +x ./k9s && \
# mv ./k9s /usr/local/bin/k9s

# Linux user permissions
RUN echo 'shell:x:1000:1000:shell,,,:/home/shell:/bin/bash' > /etc/passwd && \
echo 'shell:x:1000:' > /etc/group && \
Expand All @@ -39,11 +33,11 @@ RUN echo 'shell:x:1000:1000:shell,,,:/home/shell:/bin/bash' > /etc/passwd && \

# CMD file
RUN echo $'#!/bin/bash\n\
echo \n\
echo "# Run kubectl commands inside here" \n\
echo "# e.g. kubectl get all" \n\
export TERM=screen-256color \n\
exec bash' >> /usr/local/bin/welcome && \
echo \n\
echo "# Run kubectl commands inside here" \n\
echo "# e.g. kubectl get all" \n\
export TERM=screen-256color \n\
exec bash' >> /usr/local/bin/welcome && \
chmod +x /usr/local/bin/welcome

USER 1000
Expand Down
Loading