-, , Dockerfile ( docker build), docker run .
script. script, , , Dockerfile.
, git apache httpd , script, , , Dockerfile. , . gitCloneAndRunHttpd.sh
#!/bin/bash
git clone $LOCATION /app
/usr/local/apache2/bin/apachectl -f /usr/local/apache2/conf/httpd.conf
Dockerfile , script , , en :
[...]
COPY ["gitCloneAndRunHttpd.sh", "/gitCloneAndRunHttpd.sh"]
RUN chmod +x /gitCloneAndRunHttpd.sh
ENTRYPOINT ["/gitCloneAndRunHttpd.sh"]
docker build, .
, docker run -e LOCATION=https://github.com/some-git-repo.url -d your/image, repo https://github.com/some-git-repo.url /app apache httpd.
. , fooobar.com/questions/203151/..., , (/bin/sh) /file.sh abc - , , file.sh script.