Skip to content
This repository has been 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

Conversation

theanalyst
Copy link
Member

Changes Dockerfile to use the hylang image instead of building hy
itself, also requirements file modified to remove earlier dependancies
of hy & astor

Ping @tianon @paultag @copyninja for review

Changes Dockerfile to use the hylang image instead of building hy
itself, also requirements file modified to remove earlier dependancies
of hy & astor

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
...

😄

- made installing from requirements first to utilize build cache better
- removed redundant requirements
@theanalyst
Copy link
Member Author

@tianon added the steps you said (& removed unnessary requirements file), let me know if this is ok

@tianon
Copy link
Member

tianon commented Nov 5, 2014

LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants