forked from specify/webportal-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (35 loc) · 1.28 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
# Build it like this:
# docker build --tag webportal-service:improve-build .
# Run it like this:
# docker run -p 80:80 -v /absolute/location/of/your/export.zip:/home/specify/webportal-installer/specify_exports/export.zip webportal-service:improve-build
FROM ubuntu:20.04 as specify_base_ubuntu
LABEL maintainer="Specify Collections Consortium <github.com/specify>"
ENV DEBIAN_FRONTEND=noninteractive
# Get Ubuntu packages
RUN apt-get update && apt-get -y install \
curl \
default-jre \
git \
lsof \
make \
python2 \
python-lxml \
unzip \
wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
FROM specify_base_ubuntu as webportal
# Get Web Portal
COPY . /home/specify/webportal-installer
WORKDIR /home/specify/webportal-installer/
# Build the Solr app
RUN cd /home/specify/webportal-installer/ && make clean-all && make build-all
# Run Solr in foreground
# Give Solr time to get up and running
# Import .zip file
CMD ./build/bin/solr start -force -p 8983 \
&& sleep 10 \
&& make load-data \
# && ./build/bin/solr create_core -c herbarium -p 8983 -force \
# && curl 'http://localhost:8983/solr/herbarium/update?commit=true' --data-binary @./build/cores/herbarium/PortalFiles/PortalData.csv -H 'Content-type:application/csv' \
&& sleep infinity