瀏覽分類:

Docker

Docker Compose File (TensorFlow)

不想把TensorFlow硬生生安裝在作業系統上

剛好它有Docker可以用,何樂不為呢

 
TensorFlow.yml:

version: '3.1'

services:

	TernsorFlow:
		container_name: TensorFlow:latest-py3
		image: tensorflow/tensorflow
		restart: unless-stopped
		network_mode: "bridge"
		ports:
			- 6006:6006
		tty: true
		command: /bin/bash
		volumes:
			- /Users/AndyWu/Documents/Docker/TensorFlow:/TensorFlow

 

docker-compose -f TensorFlow.yml up -d
docker exec -it TensorFlow bash

Docker Compose File (Apache+PHP+MariaDB+phpMyAdmin)

備份一下在自己電腦測試網頁用的Docker Compose

(Apache2 + PHP 7.2 + MariaDB 10 + phpMyAdmin)

version: '3.1'

services:

  mariadb:
    container_name: mariadb10
    image: mariadb
    restart: unless-stopped
    ports:
      - 3006:3006
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=1
    volumes:
      - /Users/AndyWu/Documents/Docker/mysql:/var/lib/mysql
    networks:
      my_network:
        ipv4_address: "192.168.250.2"

  apache2:
    container_name: apache2
    image: mobingi/ubuntu-apache2-php7:7.2
    restart: unless-stopped
    ports:
      - 80:80
    volumes:
      - /Users/AndyWu/Documents/Docker/apache2+php7.2:/var/www/html
    networks:
      my_network:
        ipv4_address: "192.168.250.3"
    depends_on:
      - mariadb

  phpmyadmin:
    container_name: phpmyadmin
    image: phpmyadmin/phpmyadmin
    restart: unless-stopped
    ports:
      - 81:80
    environment:
      - PMA_ARBITRARY=1
      - PMA_HOST=192.168.250.2
      - PMA_PORTS=3006
    networks:
      my_network:
        ipv4_address: "192.168.250.4"
    depends_on:
      - mariadb

networks:
  my_network:
    driver: bridge
    ipam:
      config:
        - subnet: "192.168.250.0/24"