Commit 355fe811 authored by Matthieu Muffato's avatar Matthieu Muffato Committed by Marek Szuba
Browse files

[Docker] Get the current state of the repo instead of cloning it again

This allows testing local modifications and works on all branches as is.
parent 43bbd0e3
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# This is a Dockerfile to run eHive scripts (init_pipeline.pl, beekeeper.pl, runWorker.pl) in a container # This is a Dockerfile to run eHive scripts (init_pipeline.pl, beekeeper.pl, runWorker.pl) in a container
# #
## Build the image ## Build the image
# docker build -t ensembl-hive . # docker build -t ensembl-hive -f docker/Dockerfile $EHIVE_ROOT_DIR
# #
## Check that the test-suite works (guest_language.t is expected to fail ## Check that the test-suite works (guest_language.t is expected to fail
# docker run -e EHIVE_TEST_PIPELINE_URLS=sqlite:/// ensembl-hive prove -r /repo/ensembl-hive/t # docker run -e EHIVE_TEST_PIPELINE_URLS=sqlite:/// ensembl-hive prove -r /repo/ensembl-hive/t
...@@ -29,13 +29,21 @@ ...@@ -29,13 +29,21 @@
# docker run -it ensembl-hive beekeeper.pl -url $URL -loop -sleep 0.2 # docker run -it ensembl-hive beekeeper.pl -url $URL -loop -sleep 0.2
# docker run -it ensembl-hive runWorker.pl -url $URL # docker run -it ensembl-hive runWorker.pl -url $URL
# 1. Get the current ensembl-hive repo and remove stuff we don't want
FROM alpine:3.9.4 AS repo
RUN apk add git
ADD . /tmp/ensembl-hive
# git clean will remove things listed in .gitignore, incl. .pyc, .jar etc
# but will leave local modifications and other files, thus allowing local tests
RUN cd /tmp/ensembl-hive && git clean -d -X -f
RUN rm -rf /tmp/ensembl-hive/.git
FROM ubuntu:16.04 FROM ubuntu:16.04
# Install some basic utilities # Install some basic utilities
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y \ RUN apt-get update -y \
&& apt-get install -y git maven curl \ && apt-get install -y maven curl \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
...@@ -46,8 +54,8 @@ RUN mkdir -p /opt \ ...@@ -46,8 +54,8 @@ RUN mkdir -p /opt \
ENV JAVA_HOME=/opt/jdk-12.0.1 ENV JAVA_HOME=/opt/jdk-12.0.1
ENV PATH=$JAVA_HOME/bin:$PATH ENV PATH=$JAVA_HOME/bin:$PATH
# Clone the repo # Get the repo
RUN mkdir /repo && git clone -b master https://github.com/Ensembl/ensembl-hive.git /repo/ensembl-hive COPY --from=repo /tmp/ensembl-hive /repo/ensembl-hive
# Install all the dependencies # Install all the dependencies
RUN /repo/ensembl-hive/docker/setup_os.Ubuntu-16.04.sh \ RUN /repo/ensembl-hive/docker/setup_os.Ubuntu-16.04.sh \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment