buildx tweaks
This commit is contained in:
parent
200266120b
commit
c08157e213
@ -31,7 +31,9 @@ RUN apt-get update \
|
||||
|
||||
# s6 overlay
|
||||
COPY ./scripts/install-s6.sh /tmp/install-s6.sh
|
||||
RUN chmod +x /tmp/install-s6.sh && /tmp/install-s6.sh "${TARGETPLATFORM}" && rm -f /tmp/install-s6
|
||||
RUN chmod +x /tmp/install-s6.sh \
|
||||
&& /tmp/install-s6.sh "${TARGETPLATFORM}" \
|
||||
&& rm -f /tmp/install-s6
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
|
||||
@ -9,4 +9,4 @@ services:
|
||||
TARGETPLATFORM: 'linux/amd64'
|
||||
# TARGETPLATFORM: 'linux/arm64'
|
||||
# TARGETPLATFORM: 'linux/arm32/v7'
|
||||
image: certbot:test
|
||||
image: certbot_only:test
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
REGISTRY="ahgraber"
|
||||
TAG=${1:-"test"}
|
||||
|
||||
# clone/update keycloak container instructions
|
||||
# define build context
|
||||
# assumes run from project folder root
|
||||
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
|
||||
# buildx
|
||||
@ -13,7 +14,8 @@ docker buildx use "${BUILDX_NAME:-certbot}"
|
||||
docker buildx build \
|
||||
-f Dockerfile \
|
||||
-t ${REGISTRY}/certbot_only:${TAG} \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--no-cache \
|
||||
--platform linux/amd64,linux/arm/v7,linux/arm64 \
|
||||
--push \
|
||||
.
|
||||
|
||||
|
||||
@ -2,8 +2,10 @@
|
||||
|
||||
# Note: This script is designed to be run inside a Docker Build for a container
|
||||
|
||||
S6_OVERLAY_VERSION=1.22.1.0
|
||||
|
||||
TARGETPLATFORM=$1
|
||||
# S6_OVERLAY_VERSION="v2.2.0.3"
|
||||
S6_OVERLAY_VERSION="latest"
|
||||
|
||||
# Determine the correct binary file for the architecture given
|
||||
case $TARGETPLATFORM in
|
||||
@ -11,6 +13,10 @@ case $TARGETPLATFORM in
|
||||
S6_ARCH=aarch64
|
||||
;;
|
||||
|
||||
linux/aarch64)
|
||||
S6_ARCH=aarch64
|
||||
;;
|
||||
|
||||
linux/arm/v7)
|
||||
S6_ARCH=armhf
|
||||
;;
|
||||
@ -20,10 +26,11 @@ case $TARGETPLATFORM in
|
||||
;;
|
||||
esac
|
||||
|
||||
echo -e "Installing S6-overlay v${S6_OVERLAY_VERSION} for ${TARGETPLATFORM} (${S6_ARCH})"
|
||||
echo -e "Installing S6-overlay ${S6_OVERLAY_VERSION} for ${TARGETPLATFORM} (${S6_ARCH})"
|
||||
|
||||
curl -L -o "/tmp/s6-overlay-${S6_ARCH}.tar.gz" "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.gz" \
|
||||
&& tar xzf /tmp/s6-overlay-amd64.tar.gz -C / --exclude="./bin" && \
|
||||
tar xzf /tmp/s6-overlay-amd64.tar.gz -C /usr ./bin
|
||||
# curl -L -o "/tmp/s6-overlay-${S6_ARCH}.tar.gz" "https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.gz" \
|
||||
curl -L -o "/tmp/s6-overlay-${S6_ARCH}.tar.gz" "https://github.com/just-containers/s6-overlay/releases/latest/s6-overlay-${S6_ARCH}.tar.gz" \
|
||||
&& tar xzf /tmp/s6-overlay-${S6_ARCH}.tar.gz -C / --exclude="./bin" \
|
||||
&& tar xzf /tmp/s6-overlay-${S6_ARCH}.tar.gz -C /usr ./bin
|
||||
|
||||
echo -e "S6-overlay install complete."
|
||||
Loading…
Reference in New Issue
Block a user