Skip to content

Instantly share code, notes, and snippets.

@Servuc
Last active October 12, 2017 12:07
Show Gist options
  • Save Servuc/8e9b9bc2ba5e5189e8425871c0f8db2f to your computer and use it in GitHub Desktop.
Save Servuc/8e9b9bc2ba5e5189e8425871c0f8db2f to your computer and use it in GitHub Desktop.
Example of Dockerfile for teaching
services:
db:
image: mysql:5.7
services:
db:
build:
context: ./dir
dockerfile: Dockerfile-alternate
services:
db:
image: mysql:5.7
devices:
- "/dev/ttyUSB0:/dev/ttyUSB0"
services:
db:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: somewordpress
services:
db:
image: mysql:5.7
ports:
- "3306:3306"
- "8000-8010:1234-1244"
services:
db:
image: mysql:5.7
volumes:
- "data/config:/etc/mysql/config"
- "dbdata:/var/data/mysql
volumes:
dbdata:
version: '3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- "8000:80"
restart: always
volumes:
db_data:
FROM debian:latest
RUN apt-get update && apt-get upgrade -y && apt-get install -y php-cli && \
mkdir /monDossier && mkdir /monDossier/share
COPY monScript.php /monDossier
ADD http://proof.ovh.net/files/1Mb.dat /monDossier
RUN mv /monDossier/monScript.php /monDossier/index.php
VOLUME /monDossier/share
EXPOSE 80
WORKDIR /monDossier
CMD php -S 0.0.0.0:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment