在我公司,我们有一个地址为https://10.X.X.100/nexus3的Nexus 3存储库。 Docker documents说我们必须这样做:
docker tag <imageId or imageName> <nexus-hostname>:<repository-port>/<image>:<tag>
docker tag af340544ed62 nexus.example.com:18444/hello-world:mytag
但是,由于我的主机名中带有斜杠('/'),因此我认为它会将nexus3识别为我的映像而不是服务器。这样就创建了标签:
docker tag <imageId> http://10.X.X.100/nexus3:18079/myimage:latest
但它会向我返回此错误
Error parsing reference: "http://10.X.X.100/nexus3:18079/myimage:latest" is not a valid repository/tag: invalid reference format
PS:我删除了 http:// ,但错误是相同的。
我没有找到这种情况或可能的例子。
你们知道怎么做吗?
答案 0 :(得分:0)
尝试从URL中删除http://。
outfile = open("output.txt", "w")
with open("input.txt") as f:
report_line = ""
for line in f:
operator, data = line.lower().strip().split(":")
line = line.split(":")
operator = line[0].lower().strip()
data = line[1].strip().split(",")
newData = []
for x in data:
newData.append(int(x))
if operator == "min":
result = min(newData)
elif operator == "max":
result = max(newData)
elif operator == "avg":
result = sum(newData) / len(newData)
report_line += "The {} of {} is {}.\n".format(operator, newData, result)
outfile.write(report_line)
outfile.close()