Feature: Docker multiarch image (amd64 & arm64) dynamic tags and ghcr repositoy (#400)
* Enabled multiarch build with buildx, qemu and also enabled ghcr, improved tagging
- Enabled multiarch build with buildx, qemu and also enabled ghcr
- Improved image tagging
- Getting rid unknown/unknonw architecture in ghcr
- https://github.com/docker/build-push-action
- https://docs.docker.com/build/attestations/slsa-provenance/
- https://github.com/docker/build-push-action/issues/820
* Switched to lukechannings/deno docke rimage as proposed in #136
- silverbulletmd/silverbullet/issues/136
(cherry picked from commit 176b70f5481dbbef9744818662f47617903de209)
* Added tini, condensed Dockerfile Run to one step, cleaning up image
- tini is missing in new base image, so I added it manually, as
documented in https://github.com/krallin/tini
(cherry picked from commit 4d549b8f5b45bcc9ea04a0e7a4fdc3c82cdd7f5c)
* Using TARGETARCH for downloading tini
(cherry picked from commit 23a6019da00115b34c3bd09eb0c733172edcebbc)
This commit is contained in:
+21
-5
@@ -1,5 +1,4 @@
|
||||
FROM denoland/deno:alpine-1.33.2
|
||||
|
||||
FROM lukechannings/deno:v1.33.2
|
||||
# The volume that will keep the space data
|
||||
# Create a volume first:
|
||||
# docker volume create myspace
|
||||
@@ -7,12 +6,29 @@ FROM denoland/deno:alpine-1.33.2
|
||||
# docker run -v myspace:/space -it zefhemel/silverbullet
|
||||
VOLUME /space
|
||||
|
||||
# Accept TARGETARCH as argument
|
||||
ARG TARGETARCH
|
||||
|
||||
# Adding tini manually, as it's not included anymore in the new baseimage
|
||||
ENV TINI_VERSION v0.19.0
|
||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} /tini
|
||||
|
||||
# Copy the bundled version of silverbullet into the container
|
||||
ADD ./dist/silverbullet.js /silverbullet.js
|
||||
|
||||
# Make sure the deno user has access to the space volume
|
||||
RUN mkdir -p /space
|
||||
RUN chown -R deno:deno /space
|
||||
RUN mkdir -p /space \
|
||||
&& chown -R deno:deno /space \
|
||||
&& chmod +x /tini \
|
||||
&& echo "**** cleanup ****" \
|
||||
&& apt-get -y autoremove \
|
||||
&& apt-get clean \
|
||||
&& rm -rf \
|
||||
/tmp/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
/var/log/* \
|
||||
/usr/share/man
|
||||
|
||||
# deno user id is 1000 in alpine image
|
||||
USER deno
|
||||
@@ -23,4 +39,4 @@ EXPOSE 3000
|
||||
|
||||
# Run the server, allowing to pass in additional argument at run time, e.g.
|
||||
# docker run -p 3002:3000 -v myspace:/space -it zefhemel/silverbullet --user me:letmein
|
||||
ENTRYPOINT ["/tini", "--", "deno", "run", "-A", "--unstable", "/silverbullet.js", "--hostname", "0.0.0.0", "/space"]
|
||||
ENTRYPOINT ["/tini", "--", "deno", "run", "-A", "--unstable", "/silverbullet.js", "--hostname", "0.0.0.0", "/space"]
|
||||
|
||||
Reference in New Issue
Block a user