See this issue.
Docker best practise to Control and configure Docker with systemd.
-
Create
daemon.jsonfile in/etc/docker:{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
| package main | |
| import ( | |
| "io" | |
| "mime/multipart" | |
| "net/http" | |
| "net/url" | |
| "os" | |
| "fmt" | |
| ) |
| # coding: utf-8 | |
| # py2 origin author lrdcq | |
| # usage python3 unwxapkg.py filename | |
| __author__ = 'Integ: https://github.com./integ' | |
| import sys, os | |
| import struct | |
| class WxapkgFile(object): |
| -- NOTE: Organizations have id and parentOrgId columns | |
| -- OrgClosure has parentId, childId, depth columns | |
| CREATE OR REPLACE TRIGGER Org_Add_Trigger | |
| AFTER INSERT ON Organization | |
| REFERENCING NEW AS NEW | |
| FOR EACH ROW | |
| BEGIN | |
| -- must insert in this order... | |
| insert into OrgClosure (parentId, childId, depth) |
See this issue.
Docker best practise to Control and configure Docker with systemd.
Create daemon.json file in /etc/docker:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| 豆瓣租房爬虫 | |
| Install: | |
| pip install beautifulsoup4 | |
| Usage: |
Whichever route you take to implementing containers, you’ll want to steer clear of common pitfalls that can undermine the efficiency of your Docker stack.
The beauty of containers—and an advantage of containers over virtual machines—is that it is easy to make multiple containers interact with one another in order to compose a complete application. There is no need to run a full application inside a single container. Instead, break your application down as much as possible into discrete services, and distribute services across multiple containers. This maximizes flexibility and reliability.
It is possible to install a complete Linux operating system inside a container. In most cases, however, this is not necessary. If your goal is to host just a single application or part of an application in the container, you need to install only the essential
This is a proof of concept of a portable operating system a-la-docker.
It is a single binary that contains an image of an OS in SquashFS and the binary to run it.
a make will build the binary with an embedded alpine image. make havre-xenial will build a binary with an embedded ubuntu image.
What does the binary do?
| <VirtualHost *:80> | |
| ServerName your.domain | |
| ServerAdmin [email protected] | |
| DocumentRoot /var/www/v2proxy/ | |
| ErrorLog ${APACHE_LOG_DIR}/error-v2proxy.log | |
| CustomLog ${APACHE_LOG_DIR}/access-v2proxy.log combined | |
| php_admin_value open_basedir "/var/www/v2proxy/:/tmp/:/proc/" | |
| <Directory /var/www/v2proxy> |