From de6f828ddb9cf7019e8b3d6d74e0e3f4ff2a68df Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Wed, 15 Feb 2023 13:49:03 +0800 Subject: [PATCH] add base/alpine-glibc/Dockerfile --- .github/workflows/alpine-glibc-image.yaml | 29 +++++++++++++++++++++++ base/alpine-glibc/Dockerfile | 24 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/alpine-glibc-image.yaml create mode 100644 base/alpine-glibc/Dockerfile diff --git a/.github/workflows/alpine-glibc-image.yaml b/.github/workflows/alpine-glibc-image.yaml new file mode 100644 index 0000000..43ebbd8 --- /dev/null +++ b/.github/workflows/alpine-glibc-image.yaml @@ -0,0 +1,29 @@ +name: Build & push apline image +on: + pull_request: + push: + paths: + - '.github/workflows/alpine-glibc-image.yaml' + - 'dockerfiles/base/alpine-glibc/Dockerfile' + branches: + - main + +jobs: + base-image: + runs-on: ubuntu-latest + name: Build alpine base image + steps: + - uses: actions/checkout@master + + - name: 'Artifact: build && push alpine image' + uses: aevea/action-kaniko@master + with: + registry: artifact.onwalk.net + username: admin + password: ${{ secrets.HELM_REPO_PASSWORD }} + path: base/alpine-glibc/ + build_file: Dockerfile' + image: k8s/alpine-glibc + tag: latest + cache: true + cache_registry: cache diff --git a/base/alpine-glibc/Dockerfile b/base/alpine-glibc/Dockerfile new file mode 100644 index 0000000..2dee856 --- /dev/null +++ b/base/alpine-glibc/Dockerfile @@ -0,0 +1,24 @@ +FROM infracost/infracost:latest as builder + +# Build IAC Runner +FROM alpine:latest +LABEL maintainer="Haitao Pan " + +ARG GLIBC_VERSION=2.34-r0 + + +# install glibc compatibility for alpine +RUN apk add --update --no-cache curl binutils \ + && curl -sL https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk \ + && curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk \ + && curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-i18n-${GLIBC_VERSION}.apk \ + && apk add --no-cache \ + glibc-${GLIBC_VERSION}.apk \ + glibc-bin-${GLIBC_VERSION}.apk \ + glibc-i18n-${GLIBC_VERSION}.apk \ + && /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 \ + && rm -rf glibc-*.apk \ + && rm -rf /var/cache/apk/* \ + +ENTRYPOINT ["bash"]