-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (34 loc) · 1.33 KB
/
Dockerfile
File metadata and controls
43 lines (34 loc) · 1.33 KB
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
FROM tomcat:8.5-jre8
# Install runtime dependencies
# perl for BLAST wrapper script
# wget and tar for downloading BLAST binaries
RUN apt-get update && \
apt-get install -y --no-install-recommends \
perl \
wget \
ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Download and install legacy BLAST 2.2.26
RUN wget -q -O /tmp/blast-legacy.tar.gz \
ftp://ftp.ncbi.nlm.nih.gov/blast/executables/legacy.NOTSUPPORTED/2.2.26/blast-2.2.26-x64-linux.tar.gz && \
tar -xzf /tmp/blast-legacy.tar.gz -C /opt && \
rm /tmp/blast-legacy.tar.gz && \
ln -s /opt/blast-2.2.26/bin/* /usr/local/bin/
# Remove default webapps
RUN rm -rf /usr/local/tomcat/webapps/*
# Copy PIPs webapp
COPY pips/ /usr/local/tomcat/webapps/pips/
# Copy external dependencies
COPY dependencies/bin/ /opt/pips/bin/
COPY dependencies/database/ /opt/pips/database/
# Create working directories with appropriate permissions
RUN mkdir -p /opt/pips/tmp /opt/pips/query && \
chmod +x /opt/pips/bin/* && \
chmod 1777 /opt/pips/tmp /opt/pips/query
# Update log4j to use container-appropriate path
RUN sed -i 's|/homes/www-pip/tomcat/logs/www-pips.log|/usr/local/tomcat/logs/www-pips.log|g' \
/usr/local/tomcat/webapps/pips/WEB-INF/classes/log4j.properties
# Expose HTTP port
EXPOSE 8080
# Use default Tomcat startup
CMD ["catalina.sh", "run"]