hooks/post_checkout, hooks/post_push, and multi-arch-manifest.yaml try to get multi-arch working more smoothly
This commit is contained in:
parent
4bfd11ae81
commit
a77afc2d40
@ -50,10 +50,6 @@ RUN apk --no-cache --no-progress upgrade && \
|
|||||||
echo '' >>$file && \
|
echo '' >>$file && \
|
||||||
echo ' # Time Machine' >>$file && \
|
echo ' # Time Machine' >>$file && \
|
||||||
echo ' fruit:delete_empty_adfiles = yes' >>$file && \
|
echo ' fruit:delete_empty_adfiles = yes' >>$file && \
|
||||||
echo ' fruit:metadata = stream' >>$file && \
|
|
||||||
echo ' fruit:model = MacSamba' >>$file && \
|
|
||||||
echo ' fruit:posix_rename = yes' >>$file && \
|
|
||||||
echo ' fruit:resource = file' >>$file && \
|
|
||||||
echo ' fruit:time machine = yes' >>$file && \
|
echo ' fruit:time machine = yes' >>$file && \
|
||||||
echo ' fruit:veto_appledouble = no' >>$file && \
|
echo ' fruit:veto_appledouble = no' >>$file && \
|
||||||
echo ' fruit:wipe_intentionally_left_blank_rfork = yes' >>$file && \
|
echo ' fruit:wipe_intentionally_left_blank_rfork = yes' >>$file && \
|
||||||
|
@ -51,10 +51,6 @@ RUN apk --no-cache --no-progress upgrade && \
|
|||||||
echo '' >>$file && \
|
echo '' >>$file && \
|
||||||
echo ' # Time Machine' >>$file && \
|
echo ' # Time Machine' >>$file && \
|
||||||
echo ' fruit:delete_empty_adfiles = yes' >>$file && \
|
echo ' fruit:delete_empty_adfiles = yes' >>$file && \
|
||||||
echo ' fruit:metadata = stream' >>$file && \
|
|
||||||
echo ' fruit:model = MacSamba' >>$file && \
|
|
||||||
echo ' fruit:posix_rename = yes' >>$file && \
|
|
||||||
echo ' fruit:resource = file' >>$file && \
|
|
||||||
echo ' fruit:time machine = yes' >>$file && \
|
echo ' fruit:time machine = yes' >>$file && \
|
||||||
echo ' fruit:veto_appledouble = no' >>$file && \
|
echo ' fruit:veto_appledouble = no' >>$file && \
|
||||||
echo ' fruit:wipe_intentionally_left_blank_rfork = yes' >>$file && \
|
echo ' fruit:wipe_intentionally_left_blank_rfork = yes' >>$file && \
|
||||||
|
@ -51,10 +51,6 @@ RUN apk --no-cache --no-progress upgrade && \
|
|||||||
echo '' >>$file && \
|
echo '' >>$file && \
|
||||||
echo ' # Time Machine' >>$file && \
|
echo ' # Time Machine' >>$file && \
|
||||||
echo ' fruit:delete_empty_adfiles = yes' >>$file && \
|
echo ' fruit:delete_empty_adfiles = yes' >>$file && \
|
||||||
echo ' fruit:metadata = stream' >>$file && \
|
|
||||||
echo ' fruit:model = MacSamba' >>$file && \
|
|
||||||
echo ' fruit:posix_rename = yes' >>$file && \
|
|
||||||
echo ' fruit:resource = file' >>$file && \
|
|
||||||
echo ' fruit:time machine = yes' >>$file && \
|
echo ' fruit:time machine = yes' >>$file && \
|
||||||
echo ' fruit:veto_appledouble = no' >>$file && \
|
echo ' fruit:veto_appledouble = no' >>$file && \
|
||||||
echo ' fruit:wipe_intentionally_left_blank_rfork = yes' >>$file && \
|
echo ' fruit:wipe_intentionally_left_blank_rfork = yes' >>$file && \
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
[[ "${DOCKER_TAG}" == "latest" ]] && \
|
API="https://api.github.com/repos/estesp/manifest-tool/tags"
|
||||||
|
URL="https://github.com/estesp/manifest-tool/releases/download"
|
||||||
|
TAG=$(curl -Ls $API | awk -F'"' '/name.*v[0-9]/ {print $4; exit}')
|
||||||
|
curl -LSso manifest-tool "${URL}/${TAG}/manifest-tool-linux-amd64"
|
||||||
|
chmod +x manifest-tool
|
||||||
|
|
||||||
|
[[ "${DOCKER_TAG}" == "amd64" ]] && \
|
||||||
{ echo 'qemu-user-static: Download not required for this arch'; exit 0; }
|
{ echo 'qemu-user-static: Download not required for this arch'; exit 0; }
|
||||||
|
|
||||||
TAGS_API="https://api.github.com/repos/multiarch/qemu-user-static/tags"
|
API="https://api.github.com/repos/multiarch/qemu-user-static/tags"
|
||||||
URL="https://github.com/multiarch/qemu-user-static/releases/download"
|
URL="https://github.com/multiarch/qemu-user-static/releases/download"
|
||||||
LATEST_TAG=$(curl -Ls $TAGS_API | \
|
TAG=$(curl -Ls $API | awk -F'"' '/name.*v[0-9]/ {print $4; exit}')
|
||||||
awk -F'"' '/name.*v[0-9]/ {print $4; exit}')
|
|
||||||
ARCH=$([[ "${DOCKER_TAG}" == "armhf" ]] && \
|
ARCH=$([[ "${DOCKER_TAG}" == "armhf" ]] && \
|
||||||
echo "${DOCKER_TAG::-2}" || echo "${DOCKER_TAG}")
|
echo "${DOCKER_TAG::-2}" || echo "${DOCKER_TAG}")
|
||||||
|
|
||||||
curl -Ls "${URL}/${LATEST_TAG}/x86_64_qemu-${ARCH}-static.tar.gz" | \
|
curl -LSs "${URL}/${TAG}/x86_64_qemu-${ARCH}-static.tar.gz" | tar xzv
|
||||||
tar xzv
|
|
6
hooks/post_push
Normal file
6
hooks/post_push
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Use manifest-tool to create the manifest, given the experimental
|
||||||
|
# "docker manifest" command isn't available yet on Docker Hub.
|
||||||
|
|
||||||
|
./manifest-tool push from-spec multi-arch-manifest.yaml
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
[[ "${DOCKER_TAG}" == "latest" ]] && \
|
[[ "${DOCKER_TAG}" == "amd64" ]] && \
|
||||||
{ echo 'qemu-user-static: Registration not required for this arch';exit 0; }
|
{ echo 'qemu-user-static: Registration not required for this arch';exit 0; }
|
||||||
|
|
||||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
16
multi-arch-manifest.yaml
Normal file
16
multi-arch-manifest.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
image: dperson/samba:latest
|
||||||
|
manifests:
|
||||||
|
- image: dperson/samba:amd64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
- image: dperson/samba:aarch64
|
||||||
|
platform:
|
||||||
|
architecture: arm64
|
||||||
|
os: linux
|
||||||
|
variant: v8
|
||||||
|
- image: dperson/samba:armhf
|
||||||
|
platform:
|
||||||
|
architecture: arm
|
||||||
|
os: linux
|
||||||
|
variant: v6
|
6
samba.sh
6
samba.sh
@ -107,9 +107,9 @@ share() { local share="$1" path="$2" browsable="${3:-yes}" ro="${4:-yes}" \
|
|||||||
echo " read only = $ro" >>$file
|
echo " read only = $ro" >>$file
|
||||||
echo " guest ok = $guest" >>$file
|
echo " guest ok = $guest" >>$file
|
||||||
[[ ${VETO:-yes} == no ]] || {
|
[[ ${VETO:-yes} == no ]] || {
|
||||||
echo -n " veto files = /._*/.apdisk/.AppleDouble/.DS_Store/" >>$file
|
echo -n " veto files = /.apdisk/.DS_Store/.TemporaryItems/" >>$file
|
||||||
echo -n ".TemporaryItems/.Trashes/desktop.ini/ehthumbs.db/" >>$file
|
echo -n ".Trashes/desktop.ini/ehthumbs.db/Network Trash Folder/" >>$file
|
||||||
echo "Network Trash Folder/Temporary Items/Thumbs.db/" >>$file
|
echo "Temporary Items/Thumbs.db/" >>$file
|
||||||
echo " delete veto files = yes" >>$file
|
echo " delete veto files = yes" >>$file
|
||||||
}
|
}
|
||||||
[[ ${users:-""} && ! ${users:-""} == all ]] &&
|
[[ ${users:-""} && ! ${users:-""} == all ]] &&
|
||||||
|
Loading…
Reference in New Issue
Block a user