This repository has been archived by the owner on Jul 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 145
Update Dockerfile #1359
Merged
Merged
Update Dockerfile #1359
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM python:3.7 | ||
# Set up code directory | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
# Install deps | ||
RUN apt-get update | ||
RUN apt-get -y install libsnappy-dev gcc g++ cmake | ||
|
||
RUN git clone https://github.com/ethereum/trinity.git . | ||
RUN pip install -e .[eth2-dev] --no-cache-dir | ||
hwwhww marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
RUN echo "Type \`trinity-beacon\` to boot or \`trinity-beacon --help\` for an overview of commands" | ||
|
||
EXPOSE 30303 30303/udp | ||
ENTRYPOINT ["trinity-beacon"] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this will build the master branch Trinity, instead of PR branch of Trinity. Not sure if this is what we want.
If we want to build the PR branch, we should use something like
COPY . trinity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read some docker best practice articles earlier today. An argument is that
git clone
gives us some flexibility at the development stage, andCOPY
is more common in production.I think at the development stage, using
git clone
makes it a more isolated environment, which is good in some way.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's an interesting point though. The Eth1 Dockerfile uses
COPY
and I actually wanted to change it to usegit clone
but your point makes me re-think that. We had a few times where the docker build exposed a general problem with Trinity (usually dependency issues) and as you say, if you usegit clone
then the CI run ends up always using the source frommaster
which sounds like a weakness.Another possible idea would be to pre-process the
Dockerfile
to replace the$GITREF
like we do with theDappNode
build.trinity/Makefile
Lines 89 to 92 in 0e3e67d