# Main dockerfile template used to create images from DockerHub
#
# IMPORTANT: IMAGE_ID and COMMANDS can **NOT** be changed, they are used
# in the download process and are replaced by some variables.
#
# EXTRA is replaced by the user dockerfile in case it is used
# ONE_ENTRYPOINT is replaced by the image entry point
#
# The rest of the template can be modified depending on your needs.
#
# It is installed on /usr/share/one/dockerfiles

FROM %IMAGE_ID%
USER root
COPY context /root/context
%COMMANDS%
%EXTRA%
%ONE_ENTRYPOINT%
RUN if [ -f /one_entrypoint.sh ]; then chmod u+x /one_entrypoint.sh; fi
RUN rm -rf /root/context
RUN echo "#Generated by OpenNebula" > /etc/resolv.conf
RUN rm -f /etc/ssh/ssh_host_* > /dev/null 2>&1
RUN if [ `command -v usermod` ]; then usermod -p '*' root > /dev/null 2>&1; fi
