Skip to content

Instantly share code, notes, and snippets.

@KristerV
Last active October 4, 2017 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KristerV/c01b7947641a47e0256ab938e7fdbc4d to your computer and use it in GitHub Desktop.
Save KristerV/c01b7947641a47e0256ab938e7fdbc4d to your computer and use it in GitHub Desktop.
wget http://out.redwall.ee/rangeforce/kliendile/rangeforce-1.0.zip
unzip rangeforce-1.0.zip -d rfweb
rm rangeforce-1.0.zip
cd rfweb/dist/
# Create Dockerfile
cat > ./Dockerfile <<EOL
FROM php
COPY . /var/www/myapp
CMD ["php", "-S", "0.0.0.0:80", "-t", "/var/www/myapp"]
EOL
# Build and run container
docker build -t rangeforce_web .
docker run -d -p 80:80 --name rangeforce_web_container rangeforce_web
# STOP COPY HERE if all you want to do is start the server
# Remove container
docker container kill /rangeforce_web_container
docker container rm /rangeforce_web_container
# Use bash inside the container
docker exec -ti rangeforce_web_container /bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment