forked from archivesspace/archivesspace
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
62 lines (48 loc) · 1.91 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
FROM ubuntu:18.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.
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update && \
apt-get -y install --no-install-recommends \
build-essential \
git \
openjdk-8-jre-headless \
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" && \
./scripts/build_release $ARCHIVESSPACE_VERSION && \
mv ./*.zip / && \
cd / && \
unzip /*.zip -d / && \
wget http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.39/mysql-connector-java-5.1.39.jar && \
cp /mysql-connector-java-5.1.39.jar /archivesspace/lib/
ADD docker-startup.sh /archivesspace/startup.sh
RUN chmod u+x /archivesspace/startup.sh
FROM ubuntu:18.04
LABEL maintainer="[email protected]"
ENV ARCHIVESSPACE_LOGS=/dev/null \
LANG=C.UTF-8
COPY --from=build_release /archivesspace /archivesspace
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update && \
apt-get -y install --no-install-recommends \
ca-certificates \
openjdk-8-jre-headless \
wget \
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"]