Skip to content

Commit

Permalink
Update web-and-data dockerfile for core module removal
Browse files Browse the repository at this point in the history
  • Loading branch information
JREastonMarks committed Nov 3, 2023
1 parent 8055367 commit f64cd25
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions docker/web-and-data/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ COPY pom.xml /cbioportal/
COPY version.sh /cbioportal/
WORKDIR /cbioportal

# Download and explore core jar
RUN wget https://github.com/cBioPortal/cbioportal-core/releases/download/1.0.1/core-1.0.1.jar -P cbioportal-core/
RUN cd cbioportal-core; jar -xf core-1.0.1.jar

RUN for subproject in */.; do cp version.sh "$subproject"; cd "$subproject"; mvn dependency:go-offline --fail-never; cd ..; done
# RUN for subproject in */.; do cp version.sh "$subproject"; cd "$subproject"; mvn dependency:go-offline --fail-never; cd ..; done

RUN mvn dependency:go-offline --fail-never

Expand All @@ -47,17 +43,24 @@ RUN apt-get update; apt-get install -y --no-install-recommends \

# copy over core files and data-related scripts
RUN mkdir -p /cbioportal
COPY --from=build /cbioportal-core /cbioportal/core
COPY --from=build /cbioportal-core/scripts /cbioportal/scripts
COPY --from=build /cbioportal/db-scripts /cbioportal/db-scripts

#Download core files
RUN wget https://github.com/cBioPortal/cbioportal-core/releases/download/1.0.1/core-1.0.1.jar -P core/
RUN cd core; jar -xf core-1.0.1.jar; cd ..;



#COPY --from=build /cbioportal/core /cbioportal/core
#COPY --from=build /cbioportal/scripts /cbioportal/scripts
COPY --from=build /cbioportal/src/main/resources/db-scripts /cbioportal/db-scripts
COPY --from=build /cbioportal/requirements.txt /cbioportal/requirements.txt

# install build and runtime dependencies
# ignore update failure980[1298[01 w2308s
RUN pip3 install -r /cbioportal/requirements.txt

# add importer scripts to PATH for easy running in containers
RUN find /cbioportal/core/src/main/scripts/ -type f -executable \! -name '*.pl' -print0 | xargs -0 -- ln -st /usr/local/bin
RUN find /core/scripts/ -type f -name '*.pl' -print0 | xargs -0 -- ln -st /usr/local/bin

# put config files in this folder if you want to override config
ENV PORTAL_WEB_HOME=/cbioportal-webapp
Expand All @@ -67,13 +70,13 @@ ENV WEBAPP_OPTS=

# add exploded Spring Boot jar contents to image
# See: https://spring.io/guides/topicals/spring-boot-docker/
ARG DEPENDENCY=/cbioportal/target/dependency
ARG DEPENDENCY=/cbioportal/target/
RUN mkdir -p $PORTAL_WEB_HOME
COPY --from=build ${DEPENDENCY}/BOOT-INF/lib $PORTAL_WEB_HOME/lib/
COPY --from=build ${DEPENDENCY}/META-INF $PORTAL_WEB_HOME/META-INF/
COPY --from=build ${DEPENDENCY}/BOOT-INF/classes $PORTAL_WEB_HOME/
# COPY --from=build ${DEPENDENCY}/BOOT-INF/lib $PORTAL_WEB_HOME/lib/
#COPY --from=build ${DEPENDENCY}/classes/META-INF $PORTAL_WEB_HOME/META-INF/
COPY --from=build ${DEPENDENCY}/classes $PORTAL_WEB_HOME/

# add entrypoint
COPY --from=build /cbioportal/docker/web-and-data/docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["sh", "-c", "java $(echo $JAVA_OPTS) -cp /cbioportal-webapp:/cbioportal-webapp/lib/* org.cbioportal.PortalApplication $(echo $WEBAPP_OPTS)"]
CMD ["sh", "-c", "java $(echo $JAVA_OPTS) -cp /cbioportal-webapp:/cbioportal-webapp/lib/* org.cbioportal.PortalApplication $(echo $WEBAPP_OPTS)"]

0 comments on commit f64cd25

Please sign in to comment.