# syntax=docker/dockerfile:1.6 ARG APP_VERSION={{ default_app_version }} FROM {{ builder_image }} AS builder WORKDIR /build # ----------------------------------------------------------------------------- # TODO: Fetch and build {{ app_title }} # Example: # RUN git clone --depth 1 --branch "${APP_VERSION}" {{ app_repo }} source \ # && cd source \ # && npm ci \ # && npm run build # ----------------------------------------------------------------------------- FROM {{ base_image }} LABEL org.opencontainers.image.source="{{ app_repo }}" LABEL org.opencontainers.image.description="Cloudron package for {{ app_title }}" 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"]