Lzw2016
(Lzw2016)
1
How to use an image from a private, non https Docker registry
.drone.yml
- name: 构建镜像[Docker]
image: plugins/docker:18.09
settings:
registry: '172.18.1.1:15000'
repo: '172.18.1.1:15000/java-service/******'
username:
from_secret: harborUsername
password:
from_secret: harborPassword
# bip: true
insecure: true
dockerfile: ./Dockerfile
target: prod
tags: ['0.0.1-SNAPSHOT']
force_tag: true
auto_tag: false
auto_tag_suffix: ''
debug: true
launch_debug: true
logs
...
time="2019-12-02T10:30:51.077295819Z" level=info msg="loading plugin "io.containerd.differ.v1.walking"..." type=io.containerd.differ.v1
time="2019-12-02T10:30:51.077338458Z" level=info msg="loading plugin "io.containerd.gc.v1.scheduler"..." type=io.containerd.gc.v1
time="2019-12-02T10:30:51.077404360Z" level=info msg="loading plugin "io.containerd.service.v1.containers-service"..." type=io.containerd.service.v1
time="2019-12-02T10:30:51.077431270Z" level=info msg="loading plugin "io.containerd.service.v1.content-service"..." type=io.containerd.service.v1
time="2019-12-02T10:30:51.077450065Z" level=info msg="loading plugin "io.containerd.service.v1.diff-service"..." type=io.containerd.service.v1
time="2019-12-02T10:30:51.077542826Z" level=info msg="loading plugin "io.containerd.service.v1.images-service"..." type=io.containerd.service.v1
time="2019-12-02T10:30:51.077572020Z" level=info msg="loading plugin "io.containerd.service.v1.leases-service"..." type=io.containerd.service.v1
time="2019-12-02T10:30:51.077641659Z" level=info msg="loading plugin "io.containerd.service.v1.namespaces-service"..." type=io.containerd.service.v1
time="2019-12-02T10:30:51.077701470Z" level=info msg="loading plugin "io.containerd.service.v1.snapshots-service"..." type=io.containerd.service.v1
time="2019-12-02T10:30:51.077729863Z" level=info msg="loading plugin "io.containerd.runtime.v1.linux"..." type=io.containerd.runtime.v1
time="2019-12-02T10:30:51.078098185Z" level=info msg="loading plugin "io.containerd.runtime.v2.task"..." type=io.containerd.runtime.v2
time="2019-12-02T10:30:51.078450127Z" level=info msg="loading plugin "io.containerd.monitor.v1.cgroups"..." type=io.containerd.monitor.v1
time="2019-12-02T10:30:51.079034229Z" level=info msg="loading plugin "io.containerd.service.v1.tasks-service"..." type=io.containerd.service.v1
time="2019-12-02T10:30:51.079074073Z" level=info msg="loading plugin "io.containerd.internal.v1.restart"..." type=io.containerd.internal.v1
time="2019-12-02T10:30:51.079150364Z" level=info msg="loading plugin "io.containerd.grpc.v1.containers"..." type=io.containerd.grpc.v1
time="2019-12-02T10:30:51.079169189Z" level=info msg="loading plugin "io.containerd.grpc.v1.content"..." type=io.containerd.grpc.v1
time="2019-12-02T10:30:51.079201268Z" level=info msg="loading plugin "io.containerd.grpc.v1.diff"..." type=io.containerd.grpc.v1
time="2019-12-02T10:30:51.079218100Z" level=info msg="loading plugin "io.containerd.grpc.v1.events"..." type=io.containerd.grpc.v1
time="2019-12-02T10:30:51.079230062Z" level=info msg="loading plugin "io.containerd.grpc.v1.healthcheck"..." type=io.containerd.grpc.v1
time="2019-12-02T10:30:51.079244048Z" level=info msg="loading plugin "io.containerd.grpc.v1.images"..." type=io.containerd.grpc.v1
time="2019-12-02T10:30:51.079350665Z" level=info msg="loading plugin "io.containerd.grpc.v1.leases"..." type=io.containerd.grpc.v1
time="2019-12-02T10:30:51.079375982Z" level=info msg="loading plugin "io.containerd.grpc.v1.namespaces"..." type=io.containerd.grpc.v1
time="2019-12-02T10:30:51.079389647Z" level=info msg="loading plugin "io.containerd.internal.v1.opt"..." type=io.containerd.internal.v1
time="2019-12-02T10:30:51.079723957Z" level=info msg="loading plugin "io.containerd.grpc.v1.snapshots"..." type=io.containerd.grpc.v1
time="2019-12-02T10:30:51.079748833Z" level=info msg="loading plugin "io.containerd.grpc.v1.tasks"..." type=io.containerd.grpc.v1
time="2019-12-02T10:30:51.079768178Z" level=info msg="loading plugin "io.containerd.grpc.v1.version"..." type=io.containerd.grpc.v1
time="2019-12-02T10:30:51.079779960Z" level=info msg="loading plugin "io.containerd.grpc.v1.introspection"..." type=io.containerd.grpc.v1
time="2019-12-02T10:30:51.080015256Z" level=info msg=serving... address="/var/run/docker/containerd/containerd-debug.sock"
time="2019-12-02T10:30:51.080121613Z" level=info msg=serving... address="/var/run/docker/containerd/containerd.sock"
time="2019-12-02T10:30:51.080147361Z" level=info msg="containerd successfully booted in 0.024366s"
time="2019-12-02T10:30:51.090097491Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc420769cc0, READY" module=grpc
time="2019-12-02T10:30:51.094090347Z" level=info msg="parsed scheme: \"unix\"" module=grpc
time="2019-12-02T10:30:51.094113660Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
time="2019-12-02T10:30:51.094192176Z" level=info msg="ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}]" module=grpc
time="2019-12-02T10:30:51.094223784Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
time="2019-12-02T10:30:51.094279998Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc420769f80, CONNECTING" module=grpc
time="2019-12-02T10:30:51.094533708Z" level=info msg="parsed scheme: \"unix\"" module=grpc
time="2019-12-02T10:30:51.094547935Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
time="2019-12-02T10:30:51.094738979Z" level=info msg="ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}]" module=grpc
time="2019-12-02T10:30:51.094773432Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
time="2019-12-02T10:30:51.094837130Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc42017c970, CONNECTING" module=grpc
time="2019-12-02T10:30:51.095164497Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc420769f80, READY" module=grpc
time="2019-12-02T10:30:51.095333149Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc42017c970, READY" module=grpc
time="2019-12-02T10:30:51.158123675Z" level=info msg="Graph migration to content-addressability took 0.00 seconds"
time="2019-12-02T10:30:51.158993256Z" level=info msg="Loading containers: start."
time="2019-12-02T10:30:51.171036954Z" level=warning msg="Running modprobe bridge br_netfilter failed with message: ip: can't find device 'bridge'\nbridge 151336 1 br_netfilter\nstp 12976 1 bridge\nllc 14552 2 bridge,stp\nip: can't find device 'br_netfilter'\nbr_netfilter 22256 0 \nbridge 151336 1 br_netfilter\nmodprobe: can't change directory to '/lib/modules': No such file or directory\n, error: exit status 1"
time="2019-12-02T10:30:51.176941612Z" level=warning msg="Running modprobe nf_nat failed with message: `ip: can't find device 'nf_nat'\nnf_nat_masquerade_ipv4 13430 1 ipt_MASQUERADE\nnf_nat_ipv4 14115 1 iptable_nat\nnf_nat 26583 3 nf_nat_masquerade_ipv4,xt_nat,nf_nat_ipv4\nnf_conntrack 139224 6 xt_conntrack,nf_nat_masquerade_ipv4,nf_conntrack_netlink,nf_conntrack_ipv4,nf_nat_ipv4,nf_nat\nlibcrc32c 12644 3 nf_nat,nf_conntrack,xfs\nmodprobe: can't change directory to '/lib/modules': No such file or directory`, error: exit status 1"
time="2019-12-02T10:30:51.183151745Z" level=warning msg="Running modprobe xt_conntrack failed with message: `ip: can't find device 'xt_conntrack'\nxt_conntrack 12760 3 \nnf_conntrack 139224 6 xt_conntrack,nf_nat_masquerade_ipv4,nf_conntrack_netlink,nf_conntrack_ipv4,nf_nat_ipv4,nf_nat\nmodprobe: can't change directory to '/lib/modules': No such file or directory`, error: exit status 1"
time="2019-12-02T10:30:51.256799151Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
time="2019-12-02T10:30:51.297550765Z" level=info msg="Loading containers: done."
time="2019-12-02T10:30:51.314404623Z" level=info msg="Docker daemon" commit=774a1f4 graphdriver(s)=overlay2 version=18.09.3
time="2019-12-02T10:30:51.314642453Z" level=info msg="Daemon has completed initialization"
time="2019-12-02T10:30:51.337731851Z" level=info msg="API listen on /var/run/docker.sock"
time="2019-12-02T10:30:52.132039278Z" level=info msg="Error logging in to v2 endpoint, trying next endpoint: Get https://172.18.1.1:15000/v2/: http: server gave HTTP response to HTTPS client"
time="2019-12-02T10:30:52.137146207Z" level=error msg="Handler for POST /v1.39/auth returned error: Get http://172.18.1.1:15000/v2/: Get http://127.0.0.1:15000/service/token?account=[secret:harborusername]&client_id=docker&offline_token=true&service=harbor-registry: dial tcp 127.0.0.1:15000: connect: connection refused"
time="2019-12-02T10:30:52Z" level=fatal msg="Error authenticating: exit status 1"
gadzan
(Gadzan)
2
估计你跟我遇到的是同一个问题, 因为每个pipeline step都会attach到一个随机的network里, drone runner用这个属性DRONE_RUNNER_NETWORKS可以把所有pipeline step都强制attach到同一个network中.