我从5个月开始使用docker,我从来没有遇到过这个问题.我有2个具有相同ID的图像,所以我想删除我知道它已被弃用的那个.问题是它没有ID,当我尝试做的时候
dk rmi -f gitlab-lab:5005/xs/mgmt-docker-gui
Run Code Online (Sandbox Code Playgroud)
我收到一个错误:
Error response from daemon: No such image: gitlab-lab:5005/xs/mgmt-docker-gui:latest
Run Code Online (Sandbox Code Playgroud)
那么如何删除这个而不是具有相同ID的另一个呢?
jerome/mgmt-docker-ui latest 537b5ea5aa7b 4 days ago 476 MB
gitlab-lab:5005/xs/mgmt-docker-gui <none> 537b5ea5aa7b 4 days ago 476 MB
Run Code Online (Sandbox Code Playgroud) 我DOCKERADM_ENV=lab docker-compose -f docker-compose-mgmt.yml up -d
从上周开始测试东西,当我想测试一些新东西时,我删除了所有带有docker rm $(docker ps -aq)
.
但现在我不能让我的 docker-compose 因为:
错误:对于 mgmt-mongo 冲突。名称“/mgmt-mongo”已被容器 228f13fb40231043d3c532cc1fa40906eb4332722a6a69024fe6b9d0ceab8b40 使用。您必须删除(或重命名)该容器才能重用该名称。
但是当我这样做时,什么docker ps -a
都没有。
你知道它可能来自哪里吗?
我想测试我的 docker-compose.yml 是否正确。新事物是一个卷
app:
image: gitlab-${smt}:5005/smt/my-app:latest
container_name: app
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- $HOME/.docker:/root/.docker
- /home/profile_x/compose/area:/home/profile_x/compose/area
environment:
#not important for my question
ports:
- 80:80
restart: always
Run Code Online (Sandbox Code Playgroud)
所以我添加了最后一个卷,/home/profile_x/compose/area
因为我的目标是将其从 Docker 主机共享到 Docker 容器,并从主机内部的容器写入。
如何检查卷是否安装在容器内app
?
我在查找代码中的错误以删除列表中的所有子项时遇到了一些麻烦:
document.getElementById('btnGetExistingFiles').onclick = function(){
var ul = document.getElementById('listExisting');
//we split the files in a array
var existingFiles = "a.yml b.yml c.yml d.yml".split(" ");
//if the list already contains some values we remove them
if(ul.hasChildNodes()){
ul.empty();
}
//for each file we add an element in the list
existingFiles.forEach(function(fileName) {
console.log("add files");
var li = document.createElement("li");
var a = document.createElement("a");
a.setAttribute("href", "#");
a.setAttribute("class", "oneExistingFile");
a.appendChild(document.createTextNode(fileName))
li.appendChild(a);
ul.appendChild(li);
});
}
Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="dropdown">
<button id="btnGetExistingFiles" class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Dropdown Example
<span …
Run Code Online (Sandbox Code Playgroud)我正在努力获取标签的内容 <text>
$( "svg" ).click(function(e) {
console.log("we are in the svg element");
//console.log(e.target.next("text"));
});
Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="555px" preserveAspectRatio="none" style="width:1181px;height:555px;" version="1.1" viewBox="0 0 1181 555" width="1181px" zoomAndPan="magnify">
<defs>
<filter height="300%" id="fowbx44" width="300%" x="-1" y="-1"> <feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/>
</filter>
</defs>
<g>
<!--entity cadvisor--> …
Run Code Online (Sandbox Code Playgroud)在添加其他子项之前,我正在尝试删除结构中的所有子节点.
我在这里读过jQuery empty()回调没有被解雇,我可以做.empty()
,然后我的代码到底.
所以我在这里转载了我的用例
//document.getElementById("labelEnv").innerHTML ="";
$("#labelEnv").empty()
$("<input type='text' class='input-field env' value='I wont be added'/>").insertBefore($('.addEnv'));
Run Code Online (Sandbox Code Playgroud)
.form-style-2{
max-width: 600px;
padding: 10px 10px 2px 10px;
font: 13px Arial, Helvetica, sans-serif;
background: rgba(blue, 0.8);
}
.form-style-2-heading{
color:black;
font-weight: bold;
font-style: italic;
border-bottom: 2px solid #ddd;
margin-bottom: 20px;
font-size: 15px;
padding-bottom: 3px;
}
.form-style-2 label{
display:table;
width: 100%;
font-size: 15px;
}
.form-style-2 label > span{
color: black;
font-weight: bold;
padding-right: 5px;
width:25%;
display: table-cell;
}
.form-style-2 span.required{
color:red;
}
.form-style-2 …
Run Code Online (Sandbox Code Playgroud)