Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改私有仓库upgrade是拆分tag问题 #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ADD humpback-agent /opt/app/humpback-agent/humpback-agent
ADD conf/app.conf /opt/app/humpback-agent/conf/app.conf

ADD dumb-init /dumb-init
RUN chmod 777 /dumb-init

ENTRYPOINT ["/dumb-init", "--"]

Expand Down
4 changes: 3 additions & 1 deletion controllers/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,9 @@ func upgradeContainer(id, newTag string) (string, int, error) {

originalName := strings.Replace(container.Name, "/", "", 1)
tempName := originalName + strconv.FormatInt(time.Now().Unix(), 10)
newImage := strings.Split(container.Config.Image, ":")[0] + ":" + newTag
tempPaths := strings.Split(container.Config.Image, "/")
tempPaths[len(tempPaths)-1] = strings.Split(tempPaths[len(tempPaths)-1], ":")[0] + ":" + newTag
newImage := strings.Join(tempPaths, "/")

beego.Debug("UPGRADE - Begin try to pull image " + newImage)
_, err = tryPullImage(newImage)
Expand Down
Binary file added dumb-init
Binary file not shown.
71 changes: 71 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
module github.com/humpback/humpback-agent

go 1.15

require (
github.com/Microsoft/go-winio v0.4.15 // indirect
github.com/Microsoft/hcsshim v0.8.10 // indirect
github.com/astaxie/beego v1.7.2
github.com/containerd/containerd v1.4.3 // indirect
github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe // indirect
github.com/coreos/bbolt v1.3.2 // indirect
github.com/coreos/etcd v3.3.25+incompatible // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/docker/cli v20.10.0-beta1.0.20201029214301-1d20b15adc38+incompatible // indirect
github.com/docker/docker v20.10.0-beta1.0.20201110211921-af34b94a78a1+incompatible
github.com/docker/go-connections v0.4.0
github.com/docker/libcompose v0.4.1-0.20190808084053-143e0f3f1ab9
github.com/docker/libkv v0.2.1 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/google/btree v1.0.0 // indirect
github.com/google/go-cmp v0.4.1 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.9.5 // indirect
github.com/hashicorp/consul/api v1.8.0 // indirect
github.com/hashicorp/golang-lru v0.5.3 // indirect
github.com/humpback/common v0.0.0-20181013082642-ad18fdd2e380
github.com/humpback/discovery v0.0.0-20181012143229-ebb7ec858a9e // indirect
github.com/humpback/gounits v0.0.0-20190102083213-0662ccb72e5a
github.com/humpback/humpback-center v0.0.0-20181013083831-2056b39e5a80
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/json-iterator/go v1.1.10 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mitchellh/mapstructure v1.3.1 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/opencontainers/runc v1.0.0-rc92 // indirect
github.com/prometheus/procfs v0.0.5 // indirect
github.com/samuel/go-zookeeper v0.0.0-20200724154423-2164a8ac840e // indirect
github.com/sirupsen/logrus v1.7.0 // indirect
github.com/soheilhy/cmux v0.1.4 // indirect
github.com/stretchr/testify v1.5.1 // indirect
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.etcd.io/bbolt v1.3.5 // indirect
golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9 // indirect
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 // indirect
golang.org/x/sys v0.0.0-20201013081832-0aaa2718063a // indirect
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece // indirect
google.golang.org/grpc v1.29.1 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gotest.tools/v3 v3.0.2 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)

replace github.com/docker/docker => github.com/moby/moby v17.12.0-ce-rc1.0.20201201034508-7d75c1d40d88+incompatible

replace golang.org/x/sys => golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
Loading