修改联网BUG
This commit is contained in:
parent
27ed8daa43
commit
5dcb95fa11
|
@ -317,9 +317,8 @@ public class ImageServiceImpl implements ImageService {
|
|||
String logs2 = k8sClientUtil.executeCommand(pod,"docker load -i "+filePath);
|
||||
// 在容器里执行 docker tag name:tag nexus3.kube-system.svc:8083/imageName:imageTag
|
||||
if (StringUtils.isNoneBlank(logs2)){
|
||||
String substring = logs2.substring(logs2.lastIndexOf(harborUrl));
|
||||
String cleanedString = substring.replaceAll("(\\r|\\n)", "");
|
||||
String tagCmd = "docker tag " + cleanedString + " " + harborUrl + "/" + repository + "/" + username + "/" + imageName + ":" + imageTag;
|
||||
String substring = logs2.substring(logs2.indexOf(":")+1).trim();
|
||||
String tagCmd = "docker tag " + substring + " " + harborUrl + "/" + repository + "/" + username + "/" + imageName + ":" + imageTag;
|
||||
String imageUrl = harborUrl + "/" + repository + "/" + username + "/" + imageName + ":" + imageTag;
|
||||
String pushCmd = "docker push " + imageUrl;
|
||||
String sizeCmd = "docker inspect --format='{{.Size}}' " + imageUrl;
|
||||
|
|
Loading…
Reference in New Issue