chore: update alpine 3.15 + YQ restic kubectl

This commit is contained in:
Jesús Pérez Lorenzo 2022-01-13 15:01:40 +00:00
parent 2e00fa658b
commit 4d76f70e4e
3 changed files with 50 additions and 12 deletions

View File

@ -31,3 +31,11 @@ Move to 2.0.8
Move to alpine 3.13
---
date: 13 January 2022
2.0.8
Move to alpine 3.15
Add YQ Kubectl Restic
---

View File

@ -1,4 +1,3 @@
Active: true
# Active: false # to not follow up webhook workflow
isPrivate: true

View File

@ -1,6 +1,8 @@
# Dockerfile for https://github.com/adnanh/webhook
FROM docker.io/golang:alpine3.13 AS build
MAINTAINER Almir Dzinovic <almir@dzinovic.net>
FROM docker.io/golang:alpine3.15 AS build
#MAINTAINER Almir Dzinovic <almir@dzinovic.net>
WORKDIR /go/src/github.com/adnanh/webhook
ENV WEBHOOK_VERSION 2.8.0
RUN apk add --update -t build-deps curl libc-dev gcc libgcc
@ -12,24 +14,53 @@ RUN curl -L --silent -o webhook.tar.gz https://github.com/adnanh/webhook
rm -rf /var/cache/apk/* && \
rm -rf /go
#iputils-ping \
# install \
#jinja2 \
FROM docker.io/alpine:3.13
FROM docker.io/alpine:3.15
ENV RESTIC_VERSION=0.12.1
ENV RESTIC_ARCH=linux_amd64
ENV K8S_VERSION=1.23.1
ENV K8S_ARCH=linux-amd64
ENV JQ_VERSION=1.6
ENV JQ_ARCH=linux64
ENV YQ_VERSION=4.16.2
ENV YQ_ARCH=linux_amd64
RUN apk add --update \
ca-certificates \
bash \
vim \
git \
bzip2 \
sed \
openssh \
openssl \
libressl \
curl \
jq \
python3 \
cmd:pip3 &&\
pip3 install jinja2 && \
curl -fSL https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl && \
chmod +x /usr/local/bin/kubectl
zlib \
gnupg \
wget \
python3; \
update-ca-certificates; \
python3 -m ensurepip; \
rm -r /usr/lib/python*/ensurepip; \
pip3 install jinja2 s3cmd ; \
curl -fSL "https://dl.k8s.io/v${K8S_VERSION}/kubernetes-client-${K8S_ARCH}.tar.gz" -o /tmp/kubernetes-client-${K8S_ARCH}.tar.gz; \
tar -C /tmp -xvzf /tmp/kubernetes-client-${K8S_ARCH}.tar.gz ;\
if [ -f /tmp/kubernetes/client/bin/kubectl ]; then mv /tmp/kubernetes/client/bin /usr/local/bin; fi ;\
rm -rf /tmp/kubernetes*; \
chmod +x /usr/local/bin/kubectl; \
curl -fSL "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_${YQ_ARCH}" -o /usr/local/bin/yq; \
chmod +x /usr/local/bin/yq; \
wget -q "https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_${RESTIC_ARCH}.bz2" -O /tmp/restic-${RESTIC_VERSION}.bz2; \
bunzip2 /tmp/restic-${RESTIC_VERSION}.bz2; \
mv /tmp/restic-${RESTIC_VERSION} /usr/local/bin/restic; \
chmod +x /usr/local/bin/restic; \
rm -f /tmp/restic*;
COPY --from=build /usr/local/bin/webhook /usr/local/bin/webhook
WORKDIR /etc/webhook
VOLUME ["/etc/webhook"]