Skip to content

Instantly share code, notes, and snippets.

@jc1987
Last active August 17, 2016 15:50
Show Gist options
  • Save jc1987/7ef3b59abbc6492132cfab346fc4d5c1 to your computer and use it in GitHub Desktop.
Save jc1987/7ef3b59abbc6492132cfab346fc4d5c1 to your computer and use it in GitHub Desktop.
build your docker
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
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