This commit is contained in:
@@ -8,8 +8,6 @@ RUN trust anchor /root/rootca.pem && update-ca-trust
|
|||||||
|
|
||||||
RUN echo '%wheel ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers
|
RUN echo '%wheel ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||||
RUN useradd -G wheel -d /build builder
|
RUN useradd -G wheel -d /build builder
|
||||||
RUN mkdir /script
|
|
||||||
COPY run.sh /script
|
|
||||||
|
|
||||||
ENV MINIO_HOST="minio.konchin.com"
|
ENV MINIO_HOST="minio.konchin.com"
|
||||||
ENV MINIO_PORT="443"
|
ENV MINIO_PORT="443"
|
||||||
@@ -21,4 +19,4 @@ ENV REPO_NAME="custom"
|
|||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
ENTRYPOINT ["/usr/bin/env"]
|
ENTRYPOINT ["/usr/bin/env"]
|
||||||
CMD ["/script/run.sh"]
|
CMD ["bash"]
|
||||||
|
|||||||
21
run.sh
21
run.sh
@@ -1,21 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
echo 'Build package'
|
|
||||||
chown -R builder .
|
|
||||||
sudo -u builder makepkg -sc --needed --noconfirm
|
|
||||||
|
|
||||||
echo 'Setup MinIO alias'
|
|
||||||
mcli alias set m "https://${MINIO_HOST}:${MINIO_PORT}" \
|
|
||||||
"$MINIO_ACCESSKEY" "$MINIO_SECRETKEY"
|
|
||||||
|
|
||||||
mkdir repo
|
|
||||||
echo 'Copy repo db from MinIO'
|
|
||||||
mcli cp "m/${MINIO_BUCKET}/${REPO_NAME}.db*" repo
|
|
||||||
mcli cp "m/${MINIO_BUCKET}/${REPO_NAME}.files" repo
|
|
||||||
|
|
||||||
echo 'Add pkgs to repo db'
|
|
||||||
repo-add -n "repo/${REPO_NAME}.db.tar.zst" /build/*.pkg.tar.zst
|
|
||||||
mv *.pkg.tar.zst repo
|
|
||||||
|
|
||||||
echo 'Update repo to MinIO'
|
|
||||||
mcli mv repo/* "m/${MINIO_BUCKET}"
|
|
||||||
Reference in New Issue
Block a user