docker

Giao dịch tiền điện tử với hummingbot

1. Tạo thư mục chứa dữ liệu bot mkdir hummingbot 2. Phân chia thư mục dữ liệu của bot cho file logs, file config và file database mkdir hummingbot/conf mkdir hummingbot/logs mkdir hummingbot/data mkdir hummingbot/scripts 3. Phân quyền thư mục Để tránh lỗi [Errno 13] Permission denied: 'conf/encrypted_default.json' thì cần phải phân quyền thư mục sudo chown -R $USER ~/hummingbot chmod -R 777 ./hummingbot 3. Tạo và chạy hummingbot docker create -it \ --name hummingbot-instance \ --network host \ --mount "type=bind,source=$(pwd)/hummingbot/conf,destination=/conf/" \ --mount "type=bind,source=$(pwd)/hummingbot/logs,destination=/logs/" \ --mount "type=bind,source=$(pwd)/hummingbot/data,destination=/data/" \ --mount "type=bind,source=$(pwd)/hummingbot/scripts,destination=/scripts/" \ coinalpha/hummingbot:latest docker start hummingbot-instance && docker attach hummingbot-instance Giới hạn tài sản có thể được sử dụng Trường hợp bạn muốn bot chỉ có thể thực thi trong 100USD có thể xem xét tính năng này.

Cài đặt LEMP để chạy Wordpress sử dụng Docker

1. NGINX version: '3' services: nginx: image: nginx:latest container_name: nginx ports: - '80:80' - '443:443' volumes: - './app:/var/www/html' - './config/nginx:/etc/nginx/conf.d' 2. MySQL (MariaDB) version: '3' services: nginx: image: nginx:latest container_name: nginx ports: - '80:80' - '443:443' volumes: - './app:/var/www/html' - './config/nginx:/etc/nginx/conf.d' mariadb: image: mariadb:10.3.9 container_name: mariadb restart: 'on-failure' environment: MYSQL_ROOT_PASSWORD: lab-skywirex volumes: - ${PWD} Luc nay co the truy cap vao container mariadb de thuc thi cau lenh SQL

Ghi chép Docker

Cài đặt Docker và Docker compose Cài đặt Docker Cài Docker cho Orange Pi 3 giống như Raspbian bằng cách sử dụng script được tạo sẵn như hướng dẫn bên dưới. Thực hiện tải về và chạy script trên local curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh Kiểm tra Docker sau khi cài đặt docker version Nếu không phải cài đặt Docker dưới tài khoản là root thì cần thêm lệnh sau

Dọn dẹp Docker

Xóa file ảnh và container của Docker docker rmi <IMAGE ID> Xem file ảnh hiện có trong hệ thống docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE centos latest 2933d50b9f77 11 days ago 196.6 MB ubuntu latest 36248ae4a9ac 11 days ago 188 MB Dọn dẹp dữ liệu và tiến trình không sử dụng của docker docker system prune WARNING! This will remove: - all stopped containers - all networks not used by at least one container - all dangling images - all build cache https://tecadmin.

Cách chạy Odoo 12 với Docker trong một container

Bài viết sẽ còn được tiếp tục ………… docker network create –driver bridge nguyenhoang-odoo-nw docker volume create –name nguyenhoang-db-data docker run -d –name nguyenhoang-db –env POSTGRES_USER=odoo –env POSTGRES_PASSWORD=nguyenhoang-secret-pw –env POSTGRES_DB=postgres –network=nguyenhoang-odoo-nw –mount source=nguyenhoang-db-data,target=/var/lib/postgresql/data library/postgres:10.5 docker logs nguyenhoang-db docker volume create –name nguyenhoang-odoo-data docker volume create –name nguyenhoang-odoo-extra-addons docker run -d –name nguyenhoang-odoo –link nguyenhoang-db:db -p 8069:8069 –network nguyenhoang-odoo-nw –mount source=nguyenhoang-odoo-data,target=/var/lib/odoo –mount source=nguyenhoang-odoo-extra-addons,target=/mnt/extra-addons –env POSTGRES_PASSWORD=nguyenhoang-secret-pw library/odoo:12.0 docker logs nguyenhoang-odoo Nguồn: https://unkkuri.com/blog/unkkuri-blog-1/post/odoo-12-in-docker-container-25