-
-
Save hasMobi/e198555704ee57e84399 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM richarvey/nginx-php-fpm | |
EXPOSE 80 | |
WORKDIR /usr/share/nginx/html/ | |
# Copy the project source code from the host machine | |
# to a temporary folder in the Docker | |
COPY ./code /usr/share/nginx/tmp_code/ | |
# Clean up the server's HTML folder first | |
RUN rm -frv /usr/share/nginx/html/* | |
# Check if it was cleaned up | |
RUN ls /usr/share/nginx/html/ | |
# Copy source code to the HTML folder | |
RUN cp -r -v /usr/share/nginx/tmp_code/* /usr/share/nginx/html/ | |
# Check if source code was copied | |
RUN ls /usr/share/nginx/html/ | |
# Remove the temporary source code, | |
# since we now copied it to the HTML folder | |
RUN rm -frv /usr/share/nginx/tmp_code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment