FROM trafex/php-nginx:latest USER root # install needed packages RUN apk update RUN apk add --no-cache python3 git # clone git repo RUN rm -rf /var/www/html RUN git clone https://github.com/laowantong/mocodo.git /var/www/html WORKDIR /var/www/html # reset git repo to the vulnerable state RUN git reset --hard 11ca879060a68e06844058cd969c6379214cc2a8 # install the application RUN python3 setup.py install # setup permissions and sessions dir RUN mkdir /var/www/html/web/sessions RUN chown -R nobody:nogroup /var/www/html RUN chmod -R 755 /var/www/html USER nobody