-
Notifications
You must be signed in to change notification settings - Fork 778
Closed
Labels
Description
What is the problem you're trying to solve
A common use-case is to customize an existing image with some minor changes. This requires a minimal Dockerfile with only a few lines. It would be nice one can declare such a Dockerfile directly inside compose.yaml, inlined
Describe the solution you'd like
Use yaml multiline literals with the pipe operator
We can introduce a new dedicated attribute:
services:
demo:
build:
dockerfile-content: |
FROM alpine
RUN apk --no-cache add curlwe also can introduce a custom notation to declare inline Dockerfile
maybe we can use a custom yaml type !inline to mark such a block
services:
demo:
build:
dockerfile: !inline |
FROM alpine
RUN apk --no-cache add curlAdditional context
docker/compose#8077
Reactions are currently unavailable