-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathDockerfile
More file actions
66 lines (53 loc) · 1.84 KB
/
Dockerfile
File metadata and controls
66 lines (53 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
ARG VERSION_PHP=8.3
ARG VERSION_COMPOSER=lts
ARG VERSION_GIT=2.52.0
FROM composer:${VERSION_COMPOSER} AS comp
# Get upstream
FROM alpine/git:${VERSION_GIT} AS upstream
ARG APP_GH_ADD_SHA=false
ARG APP_GH_REF=refs/heads/develop
ARG GIT_TREE
ARG UPSTREAM_URL="https://github.com/librebooking/librebooking"
WORKDIR /upstream
COPY --chmod=0755 scripts/clone.sh /usr/local/bin/clone.sh
RUN APP_GH_ADD_SHA=${APP_GH_ADD_SHA} \
APP_GH_REF=${APP_GH_REF} \
GIT_TREE=${GIT_TREE} \
UPSTREAM_URL=${UPSTREAM_URL} \
/usr/local/bin/clone.sh
# Build supercronic
FROM golang:trixie AS supercronic
RUN go install github.com/aptible/supercronic@v0.2.44
FROM php:${VERSION_PHP}-apache
# Labels
LABEL org.opencontainers.image.title="LibreBooking"
LABEL org.opencontainers.image.description="LibreBooking as a container"
LABEL org.opencontainers.image.url="https://github.com/librebooking/docker"
LABEL org.opencontainers.image.source="https://github.com/librebooking/docker"
LABEL org.opencontainers.image.licenses="GPL-3.0"
LABEL org.opencontainers.image.authors="colisee@hotmail.com"
# Copy bin scripts
COPY --chmod=0755 bin /usr/local/bin/
# Copy cron jobs
COPY --chown=www-data:www-data --chmod=0755 \
lb-jobs-cron /config/
# Copy composer
COPY --from=comp /usr/bin/composer /usr/bin/composer
# Copy supercronic
COPY --from=supercronic \
/go/bin/supercronic /usr/local/bin/supercronic
# Copy Librebooking
COPY --from=upstream \
--chown=www-data:root --chmod=0775 \
/upstream/ /var/www/html/
# Customize the system environment
ENV DEBIAN_FRONTEND=noninteractive
RUN bash /usr/local/bin/build_sys.sh
# Customize the image environment
USER www-data:root
VOLUME /config
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["apache2-foreground"]
EXPOSE 8080
# Customize the application environment
RUN bash /usr/local/bin/build_app.sh