简体   繁体   English

GitLab 容器注册表未更新 Docker 容器层

[英]GitLab Container Registry Not Updating Docker Container Layers

I have a Docker build environment where I build containers locally and test them.我有一个 Docker 构建环境,我在其中本地构建容器并测试它们。 When I'm done, I push them to our Dev GitLab container registry to be deployed to Kubernetes.完成后,我将它们推送到我们的 Dev GitLab 容器注册表,以部署到 Kubernetes。

I've run into a situation where either Docker isn't pushing up the newest layers or GitLab is seeing layers from a previous version and just mounting that layer so when the container is deployed in Kubernetes, the container, despite the new tag, is running the old container image.我遇到了这样一种情况,其中 Docker 没有推动最新的层或 GitLab 看到以前版本的层并且只是安装该层,因此当容器部署在 Z30136395F018797392198317C1 时,尽管新标签是 8EAZ1运行旧的容器映像。

I've tried completely wiping my Docker image repository, rebuilding, and repushing and that didn't fix it.我已经尝试完全擦除我的 Docker 映像存储库、重建和重新推送,但这并没有解决它。 I tried using the red trash icon in GitLab to delete the old version of the tag I'm trying to use.我尝试使用 GitLab 中的红色垃圾桶图标来删除我尝试使用的旧版本标签。

I added some echo's in the console output for the container so I know the new bits aren't being run but I can't figure out if the problem is Docker or GitLab or how to fix it.我在控制台 output 中为容器添加了一些回声,所以我知道新的位没有运行,但我无法确定问题是 Docker 还是 ZCF0A6993A4B526850302726CZCCA0 或如何修复它。 Anyone have any ideas?有人有想法么?

TIA!蒂亚!

Disregard -- my workers had a docker image on them and because my imagePullPolicy in my YAML was not set, it was defaulting to using the cached image in Docker.忽略——我的工人有一个 docker 图像,因为我的 YAML 中的 imagePullPolicy 没有设置,它默认使用 Docker 中的缓存图像。 I just had to clear the image on my worker node ( docker rmi -f <image name> ) and then I updated my deployment YAML to use an imagePullPolicy: Always .我只需要清除我的工作节点上的图像( docker rmi -f <image name> ),然后我更新了我的部署 YAML 以使用imagePullPolicy: Always

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM