Skip to content

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

Open
@PrimeDominus

Description

@PrimeDominus

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions