-
Notifications
You must be signed in to change notification settings - Fork 223
/
Dockerfile-arm32v7
59 lines (45 loc) · 1.79 KB
/
Dockerfile-arm32v7
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
FROM arm32v7/openjdk:8-alpine AS builder
LABEL maintainer="Michael Peter Christen <[email protected]>"
# This image is suitable for Raspberry Pi 3, 4 and Compute Module 3,
# for a RPi 1, 2, Compute Module 1 and Zero please use the arm32v6 image.
# See also: https://en.wikipedia.org/wiki/Raspberry_Pi#Processor
# create image on a Raspberry Pi with:
# sudo apt-get install openjdk-8-jdk-headless:armhf
# git clone https://github.com/loklak/loklak_server.git
# cd loklak_server
# docker build -t loklak/loklak_server:latest-arm32v7 -f Dockerfile-arm32v7 .
# start the image with (i.e.)
# docker run -d -p 9000:9000 <image>
# copy the required parts of the source code
ADD src /loklak_server/src/
ADD gradle /loklak_server/gradle/
ADD gradlew /loklak_server/
ADD build.gradle /loklak_server/
ADD settings.gradle /loklak_server/
# compile loklak
RUN cd /loklak_server && ./gradlew build --no-daemon -x checkstyleMain -x checkstyleTest -x jacocoTestReport
# Second Stage
FROM arm32v7/openjdk:8-jre-alpine
# install required software
RUN apk update && apk add --no-cache bash
# Create Volume for persistence
VOLUME ["/loklak_server/data"]
# loklak start
CMD ["/loklak_server/bin/start.sh", "-Idn"]
# setup locales
ENV LANG=en_US.UTF-8
# Expose the web interface ports
EXPOSE 9000 9443
# copy the required parts of the source code
WORKDIR /loklak_server/
COPY --from=builder /loklak_server/build/libs/loklak_server-all.jar build/libs/
ADD bin /loklak_server/bin/
ADD conf /loklak_server/conf/
ADD html /loklak_server/html/
ADD installation /loklak_server/installation/
ADD ssi /loklak_server/ssi/
ADD test/queries /loklak_server/test/queries/
# change config file
RUN sed -i 's/^\(upgradeInterval=\).*/\186400000000/' /loklak_server/conf/config.properties
# set current working directory to loklak_server
WORKDIR /loklak_server