Community maintained Docker config for the spindle server

style: capitalize docker instructions

keea.dog dc82b2ae c0af00f2

verified
Changed files
+31 -31
+31 -31
Dockerfile
···
-
from golang:1.24-alpine as builder
-
env KNOT_REPO_SCAN_PATH=/home/git/repositories
-
env CGO_ENABLED=1
+
FROM golang:1.24-alpine AS builder
+
ENV KNOT_REPO_SCAN_PATH=/home/git/repositories
+
ENV CGO_ENABLED=1
-
arg TAG='v1.10.0-alpha'
+
ARG TAG='v1.10.0-alpha'
-
workdir /app
-
run apk add git gcc musl-dev
-
run git clone -b ${TAG} https://tangled.org/@tangled.org/core .
-
run go build -o /usr/bin/knot -ldflags '-s -w -extldflags "-static"' ./cmd/knot
+
WORKDIR /app
+
RUN apk add git gcc musl-dev
+
RUN git clone -b ${TAG} https://tangled.org/@tangled.org/core .
+
RUN go build -o /usr/bin/knot -ldflags '-s -w -extldflags "-static"' ./cmd/knot
-
from alpine:edge
-
expose 5555
-
expose 22
+
FROM alpine:edge
+
EXPOSE 5555
+
EXPOSE 22
-
label org.opencontainers.image.title='knot'
-
label org.opencontainers.image.description='data server for tangled'
-
label org.opencontainers.image.source='https://tangled.org/@tangled.org/knot-docker'
-
label org.opencontainers.image.url='https://tangled.org'
-
label org.opencontainers.image.vendor='tangled.org'
-
label org.opencontainers.image.licenses='MIT'
+
LABEL org.opencontainers.image.title='knot'
+
LABEL org.opencontainers.image.description='data server for tangled'
+
LABEL org.opencontainers.image.source='https://tangled.org/@tangled.org/knot-docker'
+
LABEL org.opencontainers.image.url='https://tangled.org'
+
LABEL org.opencontainers.image.vendor='tangled.org'
+
LABEL org.opencontainers.image.licenses='MIT'
-
arg UID=1000
-
arg GID=1000
+
ARG UID=1000
+
ARG GID=1000
-
copy rootfs .
-
run chmod 755 /etc
-
run chmod -R 755 /etc/s6-overlay
-
run apk add shadow s6-overlay execline openssl openssh git curl bash
-
run groupadd -g $GID -f git
-
run useradd -u $UID -g $GID -d /home/git git
-
run openssl rand -hex 16 | passwd --stdin git
-
run mkdir -p /home/git/repositories && chown -R git:git /home/git
-
copy --from=builder /usr/bin/knot /usr/bin
-
run mkdir /app && chown -R git:git /app
+
COPY rootfs .
+
RUN chmod 755 /etc
+
RUN chmod -R 755 /etc/s6-overlay
+
RUN apk add shadow s6-overlay execline openssl openssh git curl bash
+
RUN groupadd -g $GID -f git
+
RUN useradd -u $UID -g $GID -d /home/git git
+
RUN openssl rand -hex 16 | passwd --stdin git
+
RUN mkdir -p /home/git/repositories && chown -R git:git /home/git
+
COPY --from=builder /usr/bin/knot /usr/bin
+
RUN mkdir /app && chown -R git:git /app
-
healthcheck --interval=60s --timeout=30s --start-period=5s --retries=3 \
+
HEALTHCHECK --interval=60s --timeout=30s --start-period=5s --retries=3 \
cmd curl -f http://localhost:5555 || exit 1
-
entrypoint ["/init"]
+
ENTRYPOINT ["/init"]