Last active
October 12, 2017 12:07
-
-
Save Servuc/8e9b9bc2ba5e5189e8425871c0f8db2f to your computer and use it in GitHub Desktop.
Example of Dockerfile for teaching
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
services: | |
db: | |
image: mysql:5.7 |
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
services: | |
db: | |
build: | |
context: ./dir | |
dockerfile: Dockerfile-alternate |
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
services: | |
db: | |
image: mysql:5.7 | |
devices: | |
- "/dev/ttyUSB0:/dev/ttyUSB0" |
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
services: | |
db: | |
image: mysql:5.7 | |
environment: | |
MYSQL_ROOT_PASSWORD: somewordpress |
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
services: | |
db: | |
container_name: db | |
image: mysql:5.7 | |
php: | |
image: php | |
depends_on: | |
- db | |
links: | |
- db | |
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
services: | |
db: | |
image: mysql:5.7 | |
ports: | |
- "3306:3306" | |
- "8000-8010:1234-1244" |
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
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- "data/config:/etc/mysql/config" | |
- "dbdata:/var/data/mysql | |
volumes: | |
dbdata: |
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
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: |
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 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