Skip to content

Can I replace Dockerfile with pypline ? #282

Answered by yaythomas
blaisep asked this question in Q&A
Discussion options

You must be logged in to vote

There are a few ways of going about this (sorry I took a minute to respond, the week got away from me!).

I take the heart of your question to be standardizing or normalising Dockerfiles. This is. . . tricky.

But depending on what exactly you're doing you can find a solution that Works Well(Tm) for your purposes :-D

  1. Use Dockerfiles as templates, with {substitutions} to swap in build-time values via filereplace or fileformat

So, let's say you have ops/docker/templates/my-app-dockerfile.template:

FROM {base_image}

RUN {image_cmds}
WORKDIR /usr/src/app

COPY arbdir/blah ./

RUN pip install --no-cache-dir {pip_deps}

CMD [ "python", "{default_pyscript}" ]

So the idea is that you can now ho…

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@blaisep
Comment options

@yaythomas
Comment options

Answer selected by blaisep
Comment options

You must be logged in to vote
1 reply
@blaisep
Comment options

Comment options

You must be logged in to vote
1 reply
@blaisep
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants