国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
| # Adapted from https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile | |
| # Install dependencies only when needed | |
| FROM node:16-alpine AS deps | |
| # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | |
| RUN apk add --no-cache libc6-compat | |
| WORKDIR /app | |
| COPY package.json package-lock.json ./ | |
| RUN npm ci | |
| # Rebuild the source code only when needed |
| // make a request | |
| const options = { | |
| port: 1337, | |
| host: 'localhost', | |
| headers: { | |
| 'Connection': 'Upgrade', | |
| 'Upgrade': 'websocket' | |
| } | |
| }; | |
| const protocol = 'http' |
| # Git | |
| .git | |
| .gitignore | |
| .gitattributes | |
| # CI | |
| .codeclimate.yml | |
| .travis.yml | |
| .taskcluster.yml |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
| #lowercase letters/numbers only | |
| -join ((48..57) + (97..122) | Get-Random -Count 32 | % {[char]$_}) | |
| # all characters | |
| -join ((33..126) | Get-Random -Count 32 | % {[char]$_}) |
| #!/usr/bin/python | |
| #----------------------------------- | |
| # Send SMS Text Message | |
| # | |
| # Author : Matt Hawkins | |
| # Site : http://www.raspberrypi-spy.co.uk/ | |
| # Date : 30/08/2012 | |
| # | |
| # Requires account with TxtLocal | |
| # http://www.txtlocal.co.uk/?tlrx=114032 |
| /** | |
| * "Google Now" Card | |
| */ | |
| body { | |
| background: #e1e1e1; | |
| min-height: 100%; | |
| margin: auto; | |
| } | |
| ul.gNow { | |
| width: 450px; |