Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bless Earthly Docker Image #1050

Merged
merged 10 commits into from
Jun 8, 2021
Merged

Bless Earthly Docker Image #1050

merged 10 commits into from
Jun 8, 2021

Conversation

dchw
Copy link
Collaborator

@dchw dchw commented Jun 8, 2021

Revamp entrypoint to make it more user-friendly and button it down more. Dogfoods it within our own unit testing. Docs coming once merged so I don't have to keep those up to date too with any changes here.

Sample invocation 1:

docker run --privileged -t -e NO_DOCKER=1 -v $(pwd):/src earthly/earthly:v0.5.15 +for-linux

  • -t lets Earthly detect that there is a TTY. Better than using FORCE_COLOR, when possible.
  • -e NO_DOCKER=1 Skips the Docker check. Useful for when you don't need to save images, etc.
  • -v $(pwd):/src is mounting the current dir into the conventional spot for invoking earthly.

Sample invocation 2:

docker run --privileged -t -v ~/.docker:/root/.docker -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST="unix:///var/run/docker.sock" -v $(pwd):/src earthly/earthly:v0.5.15 +for-linux

  • Note that we mount the Docker socket plus specify the DOCKER_HOST variable. If the daemon is remote or accessible otherwise, the socket mount would not be needed. Also note mounting .docker; this preserves any credentials. Should we support a docker login here?

Earthfile Show resolved Hide resolved
Earthfile Show resolved Hide resolved
earthly-entrypoint.sh Outdated Show resolved Hide resolved
examples/tests/Earthfile Show resolved Hide resolved
examples/tests/version/Earthfile Show resolved Hide resolved
@dchw dchw requested review from vladaionescu and alexcb June 8, 2021 17:42
Copy link
Member

@vladaionescu vladaionescu left a comment

Choose a reason for hiding this comment

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

Mostly nits, hence approve

earthly-entrypoint.sh Outdated Show resolved Hide resolved
earthly-entrypoint.sh Show resolved Hide resolved
earthly-entrypoint.sh Outdated Show resolved Hide resolved
earthly-entrypoint.sh Outdated Show resolved Hide resolved
…word for logging in to secrets, and do not require privileged mode if using an external buildkit.
earthly-entrypoint.sh Outdated Show resolved Hide resolved
@dchw dchw enabled auto-merge (squash) June 8, 2021 19:54
@dchw dchw merged commit ac7e82a into main Jun 8, 2021
@dchw dchw deleted the corey/entrypoint branch June 8, 2021 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants