Created
December 18, 2022 10:06
-
-
Save ZCube/40c31c6b32f957995cfc50d5519807bd to your computer and use it in GitHub Desktop.
consul
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.19-bullseye AS golang-builder | |
RUN mkdir -p /opt/bitnami | |
ADD packages.sh /packages.sh | |
RUN chmod +x /packages.sh && \ | |
/packages.sh | |
FROM consul:1.14.3 AS consul | |
FROM docker.io/bitnami/minideb:bullseye | |
ARG TARGETARCH | |
LABEL org.opencontainers.image.authors="https://github.com/ZCube/bitnami-compat" \ | |
org.opencontainers.image.description="Application repackaged by ZCube for arm64 compatible, originaly Bitnami" \ | |
org.opencontainers.image.ref.name="1.14.3-debian-11-r44" \ | |
org.opencontainers.image.source="https://github.com/ZCube/bitnami-compat" \ | |
org.opencontainers.image.title="consul" \ | |
org.opencontainers.image.vendor="ZCube" \ | |
org.opencontainers.image.version="1.14.3" | |
ENV HOME="/" \ | |
OS_ARCH="${TARGETARCH:-amd64}" \ | |
OS_FLAVOUR="debian-11" \ | |
OS_NAME="linux" | |
COPY prebuildfs / | |
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | |
# Install required system packages and dependencies | |
RUN install_packages ca-certificates curl iproute2 procps zlib1g-dev | |
RUN echo install global | |
COPY --from=golang-builder /opt/bitnami/ /opt/bitnami/ | |
ADD https://raw.githubusercontent.com/consul/consul/master/LICENSE-AGPLv3.txt /opt/bitnami/consul/licenses/LICENSE-AGPLv3.txt | |
COPY --from=consul /bin/consul /opt/bitnami/consul/bin/consul | |
RUN apt-get autoremove --purge -y curl && \ | |
apt-get update && apt-get upgrade -y && \ | |
apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives | |
RUN chmod g+rwX /opt/bitnami | |
COPY rootfs / | |
RUN /opt/bitnami/scripts/consul/postunpack.sh | |
ENV APP_VERSION="1.14.3" \ | |
BITNAMI_APP_NAME="consul" \ | |
PATH="/opt/bitnami/common/bin:/opt/bitnami/consul/bin:$PATH" | |
EXPOSE 8300 8301 8500 8600 | |
EXPOSE 8301/udp 8600/udp | |
USER 1001 | |
ENTRYPOINT [ "/opt/bitnami/scripts/consul/entrypoint.sh" ] | |
CMD [ "/opt/bitnami/scripts/consul/run.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
export PACKAGE=gosu | |
export TARGET_DIR=common | |
export VERSION=1.14.0 | |
export REF=1.14 | |
export CGO_ENABLED=0 | |
rm -rf ${PACKAGE} || true | |
mkdir -p ${PACKAGE} | |
git clone -b "${REF}" https://github.com/tianon/gosu ${PACKAGE} | |
pushd ${PACKAGE} | |
go mod download | |
go build -v -ldflags '-d -s -w' . | |
mkdir -p /opt/bitnami/${TARGET_DIR}/licenses | |
mkdir -p /opt/bitnami/${TARGET_DIR}/bin | |
cp -f LICENSE /opt/bitnami/${TARGET_DIR}/licenses/${PACKAGE}-${VERSION}.txt | |
cp -f ${PACKAGE} /opt/bitnami/${TARGET_DIR}/bin/gosu | |
popd | |
rm -rf ${PACKAGE} | |
#!/bin/bash | |
set -e | |
export PACKAGE=render-template | |
export TARGET_DIR=common | |
export VERSION=1.0.4 | |
export REF=v${VERSION} | |
export CGO_ENABLED=0 | |
rm -rf ${PACKAGE} || true | |
mkdir -p ${PACKAGE} | |
git clone -b "${REF}" https://github.com/bitnami/render-template ${PACKAGE} | |
pushd ${PACKAGE} | |
go mod download | |
go build -v -ldflags '-d -s -w' . | |
mkdir -p /opt/bitnami/${TARGET_DIR}/licenses | |
mkdir -p /opt/bitnami/${TARGET_DIR}/bin | |
cp -f COPYING /opt/bitnami/${TARGET_DIR}/licenses/${PACKAGE}-${VERSION}.txt | |
cp -f ${PACKAGE} /opt/bitnami/${TARGET_DIR}/bin/${PACKAGE} | |
popd | |
rm -rf ${PACKAGE} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment