Skip to content
This repository was archived by the owner on Dec 16, 2019. It is now read-only.

Use the official docker images while building hygdrop #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Run hygdrop
#
# VERSION 0.2

FROM hylang:0.10.1

MAINTAINER Vasudev Kamath <[email protected]>

ADD . /opt/hygdrop
WORKDIR /opt/hygdrop
RUN pip3 install -r requirements-docker.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not do something like:

COPY requirements-docker.txt /opt/hygdrop/
RUN pip3 install -r requirements-docker.txt
COPY . /opt/hygdrop

That way we get to utilize the Docker build cache a little better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, Didn't think of that.thanks! changing in a bit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, since the hylang image already has Hy installed, can't we use the same requirements.txt and let the already-installed Hy satisfy the Hy dep?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep.. that is why created requirements-docker which doesn't include hy.. the plain requirements contains hy if you're doing it the traditional way. WDYT?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I mean to say that you don't need to split them, do you? Isn't pip smart enough to notice that the hy>=0.10 dep is already satisfied and skip it appropriately?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah.. stupid me :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure I verified that assumption:

root@5006d933f5b6:/usr/src/python# pip install hy
Requirement already satisfied (use --upgrade to upgrade): hy in /opt/hylang/hy
...

😄


CMD ["hy", "./hygdrop.hy"]
15 changes: 0 additions & 15 deletions contrib/Dockerfile

This file was deleted.

3 changes: 3 additions & 0 deletions requirements-docker.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
irc
requests
docopt
7 changes: 2 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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