Last active
August 17, 2016 15:50
-
-
Save jc1987/7ef3b59abbc6492132cfab346fc4d5c1 to your computer and use it in GitHub Desktop.
build your docker
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 tutum/apache-php | |
RUN apt-get update && apt-get install -yq git && rm -rf /var/lib/apt/lists/* | |
RUN rm -fr /app | |
ADD . /app | |
RUN apt-get -yq update | |
RUN sudo apt-get install -yq software-properties-common | |
RUN sudo php -v |
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
docker build ./ -t=tagnamewhatyouwant | |
# if port mapping is needed | |
docker run -di -p 8000:80 -v /Users/jc/www/monitors/ads:/app tagnamewhatyouwant | |
# if volume sharing is needed | |
docker run -di -v /Users/jc/www/monitors/ads:/app tagnamewhatyouwant | |
# grab the name that you need | |
docker ps | |
# if you want a bash | |
docker exec -i -t tiny_sammet bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment