Passing Different Arguments When Running Docker Image Multiple Times
<p>I need to give an argument while running Docker Image which will be a number from 0-3.</p>
<p>Dockerfile has the following:</p>
<pre><code>WORKDIR &quot;mydir/build&quot;
CMD ./maker oneapp &gt; /artifacts/oneapp_$1.log ; ./maker twoapp &gt; /artifacts/twoapp_$1.log ; ./maker -j13 threeapp &gt; /artifacts/threeapp_$1.log
</code></pre>
<p>I will be running the same Docker Image multiple times so I need logs to be saved in /artifacts appended with _0, _1, _2, _3, as appropriate.</p>
<p>I tried keeping this in Docker file but don't want to pass this full line as argument while running docker.</p>
<blockquote>
<p>ENTRYPOINT [&quot;/bin/bash&quot;]</p>
<p>./maker oneapp &gt; /artifacts/oneapp_$1.log ; ./maker twoapp &gt;
/artifacts/twoapp_$1.log ; ./maker -j13 threeapp &gt;
/artifacts/threeapp_$1.log</p>
</blockquote>
<p>Is it possible to do this? What do I need to modify in Dockerfile to do what I want?</p>