forked from FLMNH/webportal-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
46 lines (34 loc) · 1.23 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
# 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 \
python3 \
python3-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 && make build
# 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 \
&& ./build/bin/solr create_core -c export -p 8983 -force \
&& curl 'http://localhost:8983/solr/export/update?commit=true' --data-binary @./build/cores/export/PortalFiles/PortalData.csv -H 'Content-type:application/csv' \
&& sleep infinity