32 lines
929 B
Docker
Executable File
32 lines
929 B
Docker
Executable File
#!/usr/bin/env -S docker build . --tag=jcosmao/flatnotes_gitinotify --network=host --file
|
|
|
|
# docker push jcosmao/flatnotes_gitinotify
|
|
|
|
FROM alpine:latest
|
|
|
|
ENV GIT_SSH_URL=""
|
|
ENV GIT_BRANCH=""
|
|
ENV GIT_SSH_KEY_FILE=""
|
|
ENV FLATNOTES_ROOT=""
|
|
|
|
ARG UNAME=user
|
|
ARG UID=1000
|
|
ARG GID=1000
|
|
|
|
RUN apk add --no-cache git inotify-tools bash openssh-client
|
|
|
|
COPY flatnotes_gitinotify.sh /app/flatnotes_gitinotify.sh
|
|
RUN chmod +x /app/flatnotes_gitinotify.sh
|
|
|
|
|
|
RUN addgroup --system --gid ${GID} ${UNAME}
|
|
RUN adduser --system --disabled-password --home /home/${UNAME} \
|
|
--uid ${UID} --ingroup ${UNAME} ${UNAME}
|
|
|
|
USER $UNAME
|
|
|
|
ENTRYPOINT ["/app/flatnotes_gitinotify.sh", "GIT_SSH_URL=${GIT_SSH_URL}", \
|
|
"GIT_BRANCH=${GIT_BRANCH}", \
|
|
"GIT_SSH_KEY_FILE=${GIT_SSH_KEY_FILE}", \
|
|
"FLATNOTES_ROOT=${FLATNOTES_ROOT}"]
|