Quantcast
Channel: Pressed – hakre on wordpress
Viewing all articles
Browse latest Browse all 53

Docker Run without “docker run”

$
0
0

So there was this one question on Stackoverflow in which the OP was linking an .htaccess tester for Mod-Rewrite-Rules. Despite this being all fine I was asking myself what about really(tm) testing this?

So I remembered the rewrite-log from the days ago and thought: Why not just fire up a docker container, do the setup for testing rewrites by turning the logs to screaming and give it a drive.

But all the setup.

So I had an idea: What about you put the whole example into the Dockerfile? It has the RUN directive, so the moment the image builds it is actually executing it.

Having it exit non-zero even prevents of storing the image locally.

Ah yeah, and why actually write a Dockerfile even.

Explainshell

This also clearly highlights a missing feature in docker: no support for here-doc strings in the Dockerfile since 2013, echo -e to the rescue (but it’s cumbersome).


Viewing all articles
Browse latest Browse all 53

Trending Articles