Skip to content
Snippets Groups Projects
Dockerfile 1.16 KiB
Newer Older
# TO BUILD the docker image: -don't- "docker build" directly!
# use docker_build.sh:
# from apps/cli/executables/datafetcher,
#   ./docker_build.sh datafetcher_test[:N]
# where '-t' specifies a name and N' is the version.
# (If ':N' is omitted, version is 'latest' by default.)
# tag is not required for the build, but without it
# the container name is an unhelpful hexadecimal value.
FROM continuumio/miniconda3:latest
ENV PATH $HOME/miniconda3/bin/conda:$PATH
# docker_build.sh should have copied environment.yml from data/;
# it will be used in the command below
RUN conda env update

# get what we'll need for the build
COPY . .

# get application files and tests
COPY src/ .
COPY test/ .

RUN ["conda", "run", "-n", "data", "python", "setup.py", "develop"]

# we'll need a Capo profile
ENV CAPO_PROFILE local
ENV CAPO_PATH test/

# finally, run the tests. be verbose. log stuff.
# (for more detailed output, use "-vv" and/or "--log-level=DEBUG";
#  to quit after first failure, use "-x")
 ENTRYPOINT ["conda", "run", "-n", "data", "pytest", "-vv", "--log-level=DEBUG", "--showlocals", "test/"]