Skip to content

Commit

Permalink
shrink
Browse files Browse the repository at this point in the history
  • Loading branch information
mlin committed Nov 21, 2019
1 parent 10e9cbb commit fcbcd4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ before_script:
script:
- |
set -e
docker build -t miniwdl --cache-from $DOCKER_CACHE_TAG .
docker build -t miniwdl_deps --target deps --cache-from $DOCKER_CACHE_TAG .
docker build -t miniwdl --cache-from miniwdl_deps .
docker run --env TRAVIS_JOB_ID=${TRAVIS_JOB_ID} --env TRAVIS_BRANCH=${TRAVIS_BRANCH} \
--group-add $(stat -c %g /var/run/docker.sock) -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp \
miniwdl make $CI_TARGET
Expand All @@ -29,7 +30,7 @@ jobs:
# Push layers back to the registry for the next build(s) to use. From time to time, one
# should delete the 'latest' tag via the quay.io website to trigger a refresh.
if [ -n "$QUAY_PASSWORD" ]; then # secure variable won't be available in others' PRs
docker tag miniwdl $DOCKER_CACHE_TAG
docker tag miniwdl_deps $DOCKER_CACHE_TAG
echo "$QUAY_PASSWORD" | docker login -u mlin+miniwdl_ci --password-stdin quay.io
docker push $DOCKER_CACHE_TAG
fi
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# or append 'bash' to that to enter interactive shell

# start with ubuntu:18.04 plus some apt packages
FROM ubuntu:18.04
FROM ubuntu:18.04 as deps
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -qq install -y \
Expand All @@ -22,6 +22,7 @@ COPY requirements.txt requirements.dev.txt /home/wdler/
RUN bash -o pipefail -c "pip3 install --user -r <(cat /home/wdler/requirements.txt /home/wdler/requirements.dev.txt)"

# add the source tree
FROM deps as all
ADD --chown=wdler:wdler . /miniwdl
WORKDIR /miniwdl

Expand Down

0 comments on commit fcbcd4d

Please sign in to comment.