This repository has been archived by the owner on Oct 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.arm64
76 lines (63 loc) · 1.83 KB
/
Dockerfile.arm64
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
67
68
69
70
71
72
73
74
75
FROM composer:1.10.17 AS composer
# build flox
RUN \
echo "**** building flox ****" && \
apk add git && \
git clone --branch master https://github.com/devfake/flox.git /build/flox && \
cd /build/flox/backend && \
composer install
###########################################
FROM cr.44net.ch/baseimages/debian-s6:11.5.5
# set version label
ARG BUILD_VERSION
ENV FLOX_VERSION=${BUILD_VERSION}
LABEL version="${BUILD_VERSION}"
LABEL maintainer="Ivan Schaller"
LABEL description="A personal watchlist"
# copy app from build step
COPY --from=composer /build/flox /app/flox
# install packages
ARG db_path='/flox/backend/database/db.sqlite'
RUN \
echo "**** installing base packages ****" && \
apt-get update && \
apt-get install -y --no-install-recommends \
sqlite3 \
php7.4 \
php7.4-sqlite3 \
php-fpm \
php-xml \
php-mbstring \
php-bcmath \
php-opcache \
nginx \
&& \
echo "**** prepare app ****" && \
touch "/app${db_path}" && \
cd /app/flox/backend && \
php artisan flox:init --no-interaction "${db_path}" && \
sed -i \
-e 's,DB_CONNECTION=.*,DB_CONNECTION=sqlite,g' \
-e 's,DB_DATABASE=.*,DB_DATABASE='"${db_path}"',g' \
/app/flox/backend/.env && \
echo "**** other preparation ****" && \
mkdir -p /run/php/ && \
touch /run/php/php7.4-fpm.sock && \
sed -i \
-e 's,user =.*,user = abc,g' \
-e 's,group =.*,group = abc,g' \
-e 's,listen.owner =.*,listen.owner = abc,g' \
-e 's,listen.group =.*,listen.group = abc,g' \
/etc/php/7.4/fpm/pool.d/www.conf && \
chown -R abc:abc /app/flox && \
echo "**** cleanup ****" && \
apt-get purge --auto-remove -y && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# copy files to container
COPY rootfs /
WORKDIR /flox
EXPOSE 8080