40 lines
1.2 KiB
Docker
40 lines
1.2 KiB
Docker
# syntax=docker/dockerfile:1.6
|
|
|
|
ARG APP_VERSION=latest
|
|
|
|
FROM cloudron/base:5.0.0 AS builder
|
|
WORKDIR /build
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# TODO: Fetch and build docker-webhook
|
|
# Example:
|
|
# RUN git clone --depth 1 --branch "${APP_VERSION}" https://github.com/thecatlady/docker-webhook source \
|
|
# && cd source \
|
|
# && npm ci \
|
|
# && npm run build
|
|
# -----------------------------------------------------------------------------
|
|
|
|
FROM cloudron/base:5.0.0
|
|
LABEL org.opencontainers.image.source="https://github.com/thecatlady/docker-webhook"
|
|
LABEL org.opencontainers.image.description="Cloudron package for docker-webhook"
|
|
|
|
ENV APP_VERSION=${APP_VERSION}
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# TODO: Copy build artefacts from the builder stage
|
|
# COPY --from=builder /build/source/dist /app/code
|
|
# -----------------------------------------------------------------------------
|
|
|
|
COPY ./app /app/code
|
|
COPY ./start.sh /app/pkg/start.sh
|
|
COPY ./test /app/pkg/test
|
|
|
|
RUN chmod +x /app/pkg/start.sh /app/pkg/test/smoke.sh \
|
|
&& mkdir -p /app/data \
|
|
&& chown -R cloudron:cloudron /app
|
|
|
|
USER cloudron
|
|
WORKDIR /app/code
|
|
|
|
CMD ["/app/pkg/start.sh"]
|