progrium / entrykit

Entrypoint tools for elegant, programmable containers
443 stars 29 forks source link

render only last file having same base filename #7

Open mia-0032 opened 8 years ago

mia-0032 commented 8 years ago

If render files having same base filename like test.01.txt test.02.txt, only last file are rendered.

My Dockerfile is like below.

FROM ubuntu:latest
ENV ENTRYKIT_VERSION   0.4.0
ADD https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz /tmp/entrykit.tgz
RUN tar -xf /tmp/entrykit.tgz -C /bin entrykit && \
    entrykit --symlink && \
    true
COPY test.01.txt.tmpl /tmp/
COPY test.02.txt.tmpl /tmp/
ENTRYPOINT [ \
    "render", \
        "/tmp/test.01.txt", \
        "/tmp/test.02.txt", \
    "--", \
    "codep", \
        "tail -f /dev/null" \
]

I run this image and exec ls /tmp/. Only test.02.txt exist.

entrykit.tgz  test.01.txt.tmpl  test.02.txt  test.02.txt.tmpl

But if divide render task into two like below, both files are renderd.

ENTRYPOINT [ \
    "render", \
        "/tmp/test.01.txt", \
    "--", \
    "render", \
        "/tmp/test.02.txt", \
    "--", \
    "codep", \
        "tail -f /dev/null" \
]
spesnova commented 8 years ago

Just hit the same issue with debian:jessie based image. But it (one render) works for gliderlabs/alpine:3.2 based image.

spesnova commented 8 years ago

But if divide render task into two like below, both files are renderd.

This works for my situation too. Thanks @mia-0032

joemcmahon commented 3 years ago

@mia-0032 I know this is like forever ago now, but would you mind doing an examples PR to add this? Thanks!