add simple entrypoint script
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a5944e43eb
commit
8ef1761404
17
docker-entrypoint.sh
Normal file
17
docker-entrypoint.sh
Normal file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ "${GCE_SSH_KEY}" ]; then
|
||||
echo "${GCE_SSH_KEY}" > $HOME/.ssh/google_compute_engine
|
||||
chmod 600 $HOME/.ssh/google_compute_engine
|
||||
fi
|
||||
|
||||
if [ "${GCE_CREDENTIALS_JSON}" ] && [ "${GCE_CREDENTIALS_FILE}" ]; then
|
||||
DIR=$(dirname "${GCE_CREDENTIALS_FILE}")
|
||||
mkdir -p "${DIR}"
|
||||
echo "${GCE_CREDENTIALS_JSON}" > "${GCE_CREDENTIALS_FILE}"
|
||||
fi
|
||||
|
||||
if [ "${MOLECULE_CUSTOM_MODULES_REPO}" ]; then
|
||||
mkdir ./library/
|
||||
git clone "${MOLECULE_CUSTOM_MODULES_REPO}" ./library/
|
||||
fi
|
@ -20,6 +20,8 @@ ENV PIP_PACKAGES="\
|
||||
pycrypto \
|
||||
"
|
||||
|
||||
COPY ./docker-entrypoint.sh /
|
||||
|
||||
RUN \
|
||||
apk update \
|
||||
&& apk add --update --no-cache ${PACKAGES} \
|
||||
@ -32,3 +34,4 @@ RUN \
|
||||
|
||||
USER root
|
||||
ENV SHELL /bin/bash
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
Reference in New Issue
Block a user