Note for Dockerfile python3.6

cedar
cedar
Aug 23, 2017 · 1 min read

最近為了將原本 AWS lambda 升級到 python3.6 的版本,所以更新 gitlab runner 用來包 python code 的 image

剛開始是使用 libery/python 來包 image

但在 build image 的時候一直出現 Unable to locate package zip 的錯誤

仔細看了一下 Dockerfile 發現在

apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/*

的部分為了縮小 image size 所以刪掉前面 apt-get update 更新的 list,所以加了這段 -> rm -rf /var/lib/apt/lists/*

知道原因後,最後改版如下

https://hub.docker.com/r/cedarkuo/docker-python3.6/~/dockerfile/

應該還有可以改進的地方…先記錄一下

)
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade