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

How to use this in Docker images based on scratch #74

Open
PrimeDominus opened this issue Feb 5, 2025 · 0 comments
Open

How to use this in Docker images based on scratch #74

PrimeDominus opened this issue Feb 5, 2025 · 0 comments

Comments

@PrimeDominus
Copy link

I'm wondering if there is a somewhat equivalent way to use the official curl-container images to do something like the following:

# use empty filesystem
FROM scratch

# import some executable application
COPY --from=docker.io/containous/whoami:v1.5.0 /whoami /whoami

# import curl from current repository image
COPY --from=ghcr.io/tarampampam/curl:8.6.0 /bin/curl /bin/curl

# Docs: <https://docs.docker.com/engine/reference/builder/#healthcheck>
HEALTHCHECK --interval=5s --timeout=2s --retries=2 --start-period=2s CMD [ \
    "curl", "--fail", "http://127.0.0.1:80/" \
]

ENTRYPOINT ["/whoami"]

Above is from https://github.com/tarampampam/curl-docker/tree/master?tab=readme-ov-file#how-can-i-use-this

If so, how?

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

No branches or pull requests

1 participant