forked from Forceu/barcodebuddy-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev.aarch64
54 lines (46 loc) · 2.02 KB
/
Dockerfile.dev.aarch64
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
FROM lsiobase/nginx:arm64v8-3.11
#Build example: docker build --no-cache --pull --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` -t forceu/barcodebuddy-docker -f Dockerfile.dev .
# set version label
ARG BUILD_DATE
LABEL build_version="BarcodeBuddy DevBuild Build-date: ${BUILD_DATE}"
LABEL maintainer="Marc Ole Bulling"
#Remove the line below, if not compiling on an x64/x86 machine
COPY qemu-aarch64-static /usr/bin/qemu-aarch64-static
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies git && \
echo "**** Installing runtime packages ****" && \
apk add --no-cache \
curl \
evtest \
php7 \
php7-curl \
php7-openssl \
php7-pdo \
php7-pdo_sqlite \
php7-sqlite3 \
php7-sockets \
screen \
sudo && \
echo "**** Installing BarcodeBuddy ****" && \
mkdir -p /app/bbuddy/ && \
git clone https://github.com/Forceu/barcodebuddy.git /app/bbuddy/ && \
rm -r /app/bbuddy/.git/ && \
sed -i 's/[[:blank:]]*const[[:blank:]]*IS_DOCKER[[:blank:]]*=[[:blank:]]*false;/const IS_DOCKER = true;/g' /app/bbuddy/config-dist.php && \
echo "Set disable_coredump false" > /etc/sudo.conf && groupadd -r websocket && useradd -r -g websocket websocket && \
sed -i 's/SCRIPT_LOCATION=.*/SCRIPT_LOCATION="\/app\/bbuddy\/index.php"/g' /app/bbuddy/example/grabInput.sh && \
sed -i 's/pm.max_children = 5/pm.max_children = 20/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/WWW_USER=.*/WWW_USER="abc"/g' /app/bbuddy/example/grabInput.sh && \
sed -i 's/IS_DOCKER=.*/IS_DOCKER=true/g' /app/bbuddy/docker/parseEnv.sh && \
sed -i 's/IS_DOCKER=.*/IS_DOCKER=true/g' /app/bbuddy/example/grabInput.sh && \
echo "**** Cleanup ****" && \
apk del --purge build-dependencies && \
rm -rf /root/.cache /tmp/* \
/usr/bin/qemu-aarch64-static
#Bug in sudo requires disable_coredump
#Max children need to be a higher value, otherwise websockets / SSE might not work properly
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 80 443
VOLUME /config