-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.local
80 lines (68 loc) · 5 KB
/
Dockerfile.local
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
76
77
78
79
80
FROM ubuntu:latest as builder
LABEL application="Github Template"
LABEL maintainer="Anthony Moulen <anthony_moulen@harvard.edu>"
RUN apt update
RUN apt install -y git
ENV ARCHIVESSPACE_VERSION="v3.4.1"
ENV ARCHIVESSPACE_GIT_REPO="https://github.com/archivesspace/archivesspace/releases/download/"
ENV MYSQL_CONNECT_VERSION="8.0.23"
# Get our archive from Maven.
RUN cd / && \
apt-get update -y && \
apt-get install -y curl wget zip unzip && \
# wget ${ARCHIVESSPACE_GIT_REPO}${ARCHIVESSPACE_VERSION}/archivesspace-${ARCHIVESSPACE_VERSION}.zip && \
wget https://github.com/archivesspace/archivesspace/releases/download/v3.4.1/archivesspace-v3.4.1.zip && \
unzip *.zip -d / && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECT_VERSION}/mysql-connector-java-${MYSQL_CONNECT_VERSION}.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/com/google/zxing/core/3.5.0/core-3.5.0.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/com/openhtmltopdf/openhtmltopdf-core/1.0.10/openhtmltopdf-core-1.0.10.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/com/openhtmltopdf/openhtmltopdf-pdfbox/1.0.10/openhtmltopdf-pdfbox-1.0.10.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/de/rototor/pdfbox/graphics2d/0.34/graphics2d-0.34.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/apache/pdfbox/pdfbox/2.0.26/pdfbox-2.0.26.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/apache/pdfbox/xmpbox/2.0.26/xmpbox-2.0.26.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/apache/pdfbox/fontbox/2.0.26/fontbox-2.0.26.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/jfree/jfreechart/1.5.3/jfreechart-1.5.3.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/freemarker/freemarker/2.3.27-incubating/freemarker-2.3.27-incubating.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.rhino/1.7.10_1/org.apache.servicemix.bundles.rhino-1.7.10_1-sources.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/openjdk/jmh/jmh-core/1.29/jmh-core-1.29.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/codelibs/jhighlight/1.1.0/jhighlight-1.1.0.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/thymeleaf/extras/thymeleaf-extras-java8time/3.0.4.RELEASE/thymeleaf-extras-java8time-3.0.4.RELEASE.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/thymeleaf/thymeleaf/3.1.0.M2/thymeleaf-3.1.0.M2.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/yaml/snakeyaml/1.26/snakeyaml-1.26.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/com/ibm/icu/icu4j/59.1/icu4j-59.1.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/apache/xmlgraphics/batik-codec/1.14/batik-codec-1.14.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/apache/xmlgraphics/batik-ext/1.14/batik-ext-1.14.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/apache/xmlgraphics/batik-transcoder/1.14/batik-transcoder-1.14.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/apache/xmlgraphics/xmlgraphics-commons/2.7/xmlgraphics-commons-2.7.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/org/verapdf/validation-model/1.18.8/validation-model-1.18.8.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/de/rototor/snuggletex/snuggletex-core/1.3.0/snuggletex-core-1.3.0.jar && \
wget -P /archivesspace/lib https://repo1.maven.org/maven2/net/sourceforge/jeuclid/jeuclid-core/3.1.9/jeuclid-core-3.1.9.jar && \
cd /archivesspace/scripts && \
sed -i "s/-cp/-Xmx4096m -cp/g" setup-database.sh && \
cd /
FROM ubuntu:latest
ENV ARCHIVESSPACE_LOGS=/logs \
LANG=C.UTF-8
COPY --from=builder /archivesspace /archivesspace
# COPY healthcheck.sh /archivesspace
# COPY migrate_or_start.sh /archivesspace
RUN DEBIAN_FRONTEND=non-interactive && \
mkdir /logs && \
apt-get -y update && \
apt-get -y install --no-install-recommends ca-certificates libyaml-dev openjdk-8-jre-headless wget unzip && \
rm -rf /var/lib/apt/lists/* && \
groupadd -g 509 aspace && \
useradd -l -s /bin/bash -m -u 509 -g aspace aspace && \
chown -R aspace:aspace /archivesspace && \
chown -R aspace:aspace /logs
# chown -R aspace:aspace /logs && \
# chmod 775 /archivesspace/healthcheck.sh && \
# chmod 775 /archivesspace/migrate_or_start.sh && \
# Run necessary init scripts
# su - aspace -c "cd /archivesspace && ./init-all.sh"
COPY --chown=aspace start_and_init.sh /archivesspace
RUN chmod 775 /archivesspace/start_and_init.sh
USER aspace
EXPOSE 8080 8081 8089 8090 8092
CMD ["/archivesspace/start_and_init.sh"]