国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
| # author: codeskyblue 2025 | |
| # https://github.com/openatx/uiautomator2 | |
| # Example: how to manually handle popup-windows | |
| import random | |
| import time | |
| from typing import Optional, Sequence, Tuple | |
| import adbutils | |
| from loguru import logger |
| """ | |
| Structlog example configuration with FastAPI. | |
| Features: | |
| - async bound logger | |
| - contextvars to log request-id and other meta data | |
| - custom format for default logging loggers and structlog loggers | |
| """ | |
| import asyncio | |
| import logging |
| import base64 | |
| import json | |
| import requests | |
| REPO_URL = "https://api.github.com/repos/<USER>/<REPO>/contents/<PATH>/<TO>/<FILE>.json" | |
| TOKEN = "<YOUR PAT OR OAUTH TOKEN>" | |
| headers = { | |
| "Authorization": f"token {TOKEN}", | |
| "Accept": "application/vnd.github.v4+raw" |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
| wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz |
| curl -H 'Authorization: token INSERTACCESSTOKENHERE' -H 'Accept: application/vnd.github.v3.raw' -O -L https://api.github.com/repos/owner/repo/contents/path |
| wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1 | |
| # --no-check-cerftificate was necessary for me to have wget not puke about https | |
| curl -LJO https://github.com/joyent/node/tarball/v0.7.1 |