-
Notifications
You must be signed in to change notification settings - Fork 113
Conversation
In addition, in the new dockerfile, maybe we could also add gdb (i took the liberty to add iptables as my next PR will require it). Just an fyi, whatever the size of the image, it doesn't change the size of instances (as it uses AUFS EDIT: or OverlayFS now ), so the impact of the docker image size on testnet is quite limited. |
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.
Referencing our #kovri-dev
chat for this feature. Thank you @MoroccanMalinois.
On a related sidenote, could you please add the license to the testnet file for this PR (I should've added it to #702)?
contrib/docker/testnet.sh
Outdated
esac | ||
fi | ||
|
||
mount_repo_bins="" |
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.
mount_repo_bins=""
I don't think this is necessary. Did you find this necessary?
contrib/docker/testnet.sh
Outdated
mount_repo_bins="" | ||
if [[ "$KOVRI_USE_REPO_BINS" = true ]]; then | ||
mount_repo_bins="-v ${KOVRI_REPO}/build/kovri:/usr/bin/kovri -v ${KOVRI_REPO}/build/kovri-util:/usr/bin/kovri-util" | ||
|
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.
If we're going to start bool'ing, how about we create bool vars for building? This [bool'ing] can then be applied elsewhere so we never have to enter keyboard input once they are all set.
What do you think? If we apply elsewhere, I think it should be in a separate commit.
contrib/docker/testnet.sh
Outdated
-w /home/kovri/kovri \ | ||
$KOVRI_IMAGE \ | ||
$@ | ||
catch "Failed to run a shell" |
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.
"Failed to run a shell"
But this could be a failed docker run too?
Hi @MoroccanMalinois, I just saw these:
Ok, sounds good. Since it's dev-only, let's do what we need.
I'm more concerned about how we manage logging. Even without debug levels, there's a lot of writing. I have some ideas on potential resolutions, will talk more in |
ce66310
to
5ccea95
Compare
5ccea95
to
2e591c4
Compare
Thanks @anonimal. Ready for review |
contrib/docker/testnet.sh
Outdated
@@ -101,7 +140,16 @@ set_image() | |||
KOVRI_IMAGE=${_default_image} | |||
fi | |||
|
|||
read_input "Build Kovri Docker image? [$KOVRI_IMAGE]" NULL "docker build -t $KOVRI_IMAGE $KOVRI_REPO" | |||
# Select Dockerfile | |||
local _default_dockerfile="Dockerfile" |
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.
May as well change to Dockerfile_dev
since this is testnet. Yes/no?
contrib/docker/testnet.sh
Outdated
mount_repo_bins="-v ${KOVRI_REPO}/build/kovri:/usr/bin/kovri \ | ||
-v ${KOVRI_REPO}/build/kovri-util:/usr/bin/kovri-util" | ||
|
||
read_bool_input "Build repo binaries?" KOVRI_BUILD_REPO_BINS "Exec make" |
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.
Re: our debugging in #kovri-dev
, any objection to making this a release-static
build?
@@ -74,6 +100,19 @@ set_repo() | |||
fi | |||
} | |||
|
|||
set_bins() | |||
{ | |||
read_bool_input "Use binaries from repo?" KOVRI_USE_REPO_BINS "" |
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.
Can you add a note to the question (or somewhere) about ensuring that the binaries are built statically if not built within the container?
2e591c4
to
5e2dd2f
Compare
5e2dd2f
to
91a8ac5
Compare
91a8ac5
to
446d43d
Compare
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.
Thanks @MoroccanMalinois
By submitting this pull-request, I confirm the following:
To avoid rebuilding the docker image for each git revision, the user can now choose to "Use binaries from repo" during testnet creation.
To rebuild the binaries:
Or get a shell first:
and then