Skip to content

Commit

Permalink
Fix Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
philiptzou committed Aug 23, 2023
1 parent 75b35e0 commit 53a6a20
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .latest-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20230823010232
20230823013659
17 changes: 9 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,27 @@ COPY hivfacts /sierra/hivfacts
COPY src /sierra/src
RUN /sierra/gradlew assemble
RUN mv build/libs/sierra-*.war build/libs/sierra.war 2>/dev/null
ENV MINIMAP2_VERSION=2.17
ENV MINIMAP2_VERSION=2.26
RUN apt-get -q update && apt-get install -qqy curl bzip2
RUN cd /tmp && \
curl -sSL https://github.com/lh3/minimap2/releases/download/v2.17/minimap2-${MINIMAP2_VERSION}_x64-linux.tar.bz2 -o minimap2.tar.bz2 && \
curl -sSL https://github.com/lh3/minimap2/releases/download/v${MINIMAP2_VERSION}/minimap2-${MINIMAP2_VERSION}_x64-linux.tar.bz2 -o minimap2.tar.bz2 && \
tar jxf minimap2.tar.bz2 && \
mv minimap2-${MINIMAP2_VERSION}_x64-linux /usr/local/minimap2

FROM hivdb/tomcat-with-nucamino:latest as postalign-builder
RUN apt-get -q update && apt-get install -qqy python3.9-full python3.9-dev gcc
RUN apt-get -q update && apt-get install -qqy python3.11-full python3.11-dev gcc
ADD https://bootstrap.pypa.io/get-pip.py /tmp/get-pip.py
RUN python3.9 /tmp/get-pip.py
RUN pip install cython==0.29.32
ARG POSTALIGN_VERSION=3f99cc81ad89d66adf3beb062c93962f0deb3352
RUN python3.11 /tmp/get-pip.py
RUN pip install cython==0.29.35
ARG POSTALIGN_VERSION=889295116cd5ac590e3929064551af82ee6741b4
RUN pip install https://github.com/hivdb/post-align/archive/${POSTALIGN_VERSION}.zip

FROM hivdb/tomcat-with-nucamino:latest
ENV CATALINA_OPTS "-Xms1024M -Xmx6144M"
RUN apt-get -q update && apt-get install -qqy python3.9
RUN apt-get -q update && apt-get install -qqy python3.11
COPY --from=builder /usr/local/minimap2 /usr/local/minimap2
COPY --from=builder /sierra/build/libs/sierra.war /usr/share/tomcat/webapps
COPY --from=postalign-builder /usr/local/lib/python3.9 /usr/local/lib/python3.9
COPY --from=postalign-builder /usr/local/lib/python3.11 /usr/local/lib/python3.11
COPY --from=postalign-builder /usr/local/bin/postalign /usr/local/bin/postalign
RUN sed -i 's/<Context>/<Context privileged="true">/' /usr/share/tomcat/conf/context.xml
RUN cd /usr/local/bin && \
Expand Down
10 changes: 5 additions & 5 deletions docker/tomcat-with-nucamino/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV CATALINA_OPTS "-Xms512M -Xmx1024M"
Expand All @@ -9,7 +9,7 @@ RUN apt-get update -qy && \
echo debconf shared/accepted-oracle-license-v1-3 select true | debconf-set-selections && \
echo debconf shared/accepted-oracle-license-v1-3 seen true | debconf-set-selections && \
apt-get install -qqy oracle-java17-installer oracle-java17-set-default
ARG TOMCAT_VERSION=10.0.14
ARG TOMCAT_VERSION=10.1.12
RUN cd /tmp && \
curl -sSL https://www.apache.org/dist/tomcat/tomcat-10/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz -o tomcat10.tar.gz && \
tar zxf tomcat10.tar.gz && \
Expand All @@ -22,10 +22,10 @@ RUN cd /tmp && \
cp /usr/share/tomcat/conf/web.xml /root/web.prod.xml && \
cp /root/web.prod.xml /usr/share/tomcat/conf/web.xml && \
rm -rf /tmp/*
ENV NUCAMINO_VERSION=0.2.0-beta.2
# ENV NUCAMINO_VERSION=0.2.0-beta.2
# RUN curl -L https://github.com/hivdb/NucAmino/releases/download/${NUCAMINO_VERSION}/nucamino-linux-amd64 -o /usr/bin/nucamino
ADD nucamino-linux-amd64 /usr/bin/nucamino
# ADD nucamino-linux-amd64 /usr/bin/nucamino
EXPOSE 8080
ADD src/hivdb-tomcat-entrypoint.sh /usr/bin/entrypoint
RUN chmod +x /usr/bin/entrypoint /usr/bin/nucamino
# RUN chmod +x /usr/bin/entrypoint /usr/bin/nucamino
ENTRYPOINT ["/usr/bin/entrypoint"]
2 changes: 1 addition & 1 deletion docker/tomcat-with-nucamino/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
build:
@docker pull ubuntu:18.04
@docker pull ubuntu:22.04
@docker build -t hivdb/tomcat-with-nucamino:latest .

force-build:
Expand Down

0 comments on commit 53a6a20

Please sign in to comment.