From 366e4185676e33e5cf615c4cfc69e36427ac7836 Mon Sep 17 00:00:00 2001 From: Abhishek Lekshmanan Date: Sat, 1 Nov 2014 14:17:13 +0530 Subject: [PATCH 1/2] Use the official docker images while building hygdrop Changes Dockerfile to use the hylang image instead of building hy itself, also requirements file modified to remove earlier dependancies of hy & astor --- .dockerignore | 1 + Dockerfile | 13 +++++++++++++ contrib/Dockerfile | 15 --------------- requirements-docker.txt | 3 +++ requirements.txt | 7 ++----- 5 files changed, 19 insertions(+), 20 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile delete mode 100644 contrib/Dockerfile create mode 100644 requirements-docker.txt diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..6b8710a --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.git diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d998a64 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +# Run hygdrop +# +# VERSION 0.2 + +FROM hylang:0.10.1 + +MAINTAINER Vasudev Kamath + +ADD . /opt/hygdrop +WORKDIR /opt/hygdrop +RUN pip3 install -r requirements-docker.txt + +CMD ["hy", "./hygdrop.hy"] diff --git a/contrib/Dockerfile b/contrib/Dockerfile deleted file mode 100644 index eedc834..0000000 --- a/contrib/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# Run hygdrop -# -# VERSION 0.1 - -FROM debian:sid -MAINTAINER Vasudev Kamath - - - -# Lets install python3 and pip and git -RUN apt-get update && apt-get install -y python3 python3-pip git -RUN git clone https://github.com/hylang/hygdrop.git -RUN pip3 install -r hygdrop/requirements.txt - -ENTRYPOINT ["hy", "hygdrop/hygdrop.hy"] diff --git a/requirements-docker.txt b/requirements-docker.txt new file mode 100644 index 0000000..1703468 --- /dev/null +++ b/requirements-docker.txt @@ -0,0 +1,3 @@ +irc +requests +docopt diff --git a/requirements.txt b/requirements.txt index 95399a7..e99287c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,2 @@ -irc -requests --e git+https://github.com/hylang/hy.git#egg=hy -astor>=0.3 -docopt +-r requirements-docker.txt +hy>=0.10 From 2f0188ba86a8340d8b37d9d5762f6575e05b466e Mon Sep 17 00:00:00 2001 From: Abhishek Lekshmanan Date: Wed, 5 Nov 2014 23:00:35 +0530 Subject: [PATCH 2/2] Better dockerfile instructions - made installing from requirements first to utilize build cache better - removed redundant requirements --- Dockerfile | 4 +++- requirements-docker.txt | 3 --- requirements.txt | 4 +++- 3 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 requirements-docker.txt diff --git a/Dockerfile b/Dockerfile index d998a64..e194abf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,10 @@ FROM hylang:0.10.1 MAINTAINER Vasudev Kamath +COPY requirements.txt /tmp/ +RUN pip3 install -r /tmp/requirements.txt ADD . /opt/hygdrop + WORKDIR /opt/hygdrop -RUN pip3 install -r requirements-docker.txt CMD ["hy", "./hygdrop.hy"] diff --git a/requirements-docker.txt b/requirements-docker.txt deleted file mode 100644 index 1703468..0000000 --- a/requirements-docker.txt +++ /dev/null @@ -1,3 +0,0 @@ -irc -requests -docopt diff --git a/requirements.txt b/requirements.txt index e99287c..a506a00 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,4 @@ --r requirements-docker.txt hy>=0.10 +irc +requests +docopt