forked from archivesspace/archivesspace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
77 lines (62 loc) · 2.36 KB
/
Dockerfile
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
FROM ubuntu:22.04 as build_release
# Please note: Docker is not supported as an install method.
# Docker configuration is being used for internal purposes only.
# Use of Docker by anyone else is "use at your own risk".
# Docker related files may be updated at anytime without
# warning or presence in release notes.
ENV DEBIAN_FRONTEND=noninteractive \
JDK_JAVA_OPTIONS="--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED" \
TZ=UTC
RUN apt-get update && \
apt-get -y install --no-install-recommends \
build-essential \
git \
nodejs \
openjdk-17-jre-headless \
shared-mime-info \
wget \
unzip
COPY . /source
RUN cd /source && \
ARCHIVESSPACE_VERSION=${SOURCE_BRANCH:-`git symbolic-ref -q --short HEAD || git describe --tags --match v*`} && \
ARCHIVESSPACE_VERSION=${ARCHIVESSPACE_VERSION#"heads/"} && \
echo "Using version: $ARCHIVESSPACE_VERSION" && \
./build/run bootstrap && \
./scripts/build_release $ARCHIVESSPACE_VERSION && \
mv ./*.zip / && \
cd / && \
unzip /*.zip -d / && \
wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.23/mysql-connector-java-8.0.23.jar && \
cp /mysql-connector-java-8.0.23.jar /archivesspace/lib/
ADD docker-startup.sh /archivesspace/startup.sh
RUN chmod u+x /archivesspace/startup.sh
FROM ubuntu:22.04
LABEL maintainer="ArchivesSpaceHome@lyrasis.org"
ENV ARCHIVESSPACE_LOGS=/dev/null \
ASPACE_GC_OPTS="-XX:+UseG1GC -XX:NewRatio=1" \
DEBIAN_FRONTEND=noninteractive \
JDK_JAVA_OPTIONS="--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED" \
LANG=C.UTF-8 \
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 \
TZ=UTC
COPY --from=build_release /archivesspace /archivesspace
RUN apt-get update && \
apt-get -y install --no-install-recommends \
ca-certificates \
git \
libjemalloc-dev \
openjdk-17-jre-headless \
netbase \
shared-mime-info \
wget \
nodejs \
unzip && \
rm -rf /var/lib/apt/lists/* && \
groupadd -g 1000 archivesspace && \
useradd -l -M -u 1000 -g archivesspace archivesspace && \
chown -R archivesspace:archivesspace /archivesspace
USER archivesspace
EXPOSE 8080 8081 8089 8090 8092
HEALTHCHECK --interval=1m --timeout=5s --start-period=5m --retries=2 \
CMD wget -q --spider http://localhost:8089/ || exit 1
CMD ["/archivesspace/startup.sh"]