小编Man*_*iai的帖子

在 Docker Desktop(Mac 和 Windows)中显示中间图像

我是 Docker 新手,但我对docker images ls -aDocker 桌面中的行为有何不同感到困惑。与在 Linux 中运行时不同,它不显示中间/悬挂图像,但它只列出我明确标记的图像。

为了说明这个问题,假设我有这个 Dockerfile。

FROM python:3
RUN apt update
RUN apt install -y vim
Run Code Online (Sandbox Code Playgroud)

将其保存为 Dockerfile 并通过命令构建并标记图像docker build -t pyvim .

docker images -a当我在 Linux 机器上执行命令时,我得到

REPOSITORY   TAG       IMAGE ID       CREATED          SIZE
pyvim        latest    9d3e171e0220   13 minutes ago   938MB
<none>       <none>    360f898a1298   13 minutes ago   904MB
python       3         cba42c28d9b8   2 days ago       886MB
Run Code Online (Sandbox Code Playgroud)

这就是我所期望的,Python 3 图像,我的图像,以及运行apt update.

然而,在 Mac 或 Windows 上执行相同的步骤后,两者都运行“Docker 桌面”,docker images -a仅显示“pyvim”图像: …

docker docker-desktop docker-cli

5
推荐指数
0
解决办法
447
查看次数

Visibility in Kotlin coroutines

I decided to dive in into Kotlin coroutines. I have some questions regarding visibility. I understand that in absence of a ContinuationInterceptor, it is possible different sections of the same coroutines to be executed by different threads.

How is guaranteed that, after a suspension, the new thread has the correct visibility of the coroutine internal state ?

For example:

    suspend fun doPost(customRatings : Map<String, Int>) : Int {...}

    fun postRatings_1() {
        GlobalScope.launch {
            val mutableMap : MutableMap<String, Int> = …
Run Code Online (Sandbox Code Playgroud)

concurrency multithreading kotlin kotlin-coroutines

3
推荐指数
1
解决办法
58
查看次数