Skip to content

replace docker tags with corresponding digests #422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

gbrownmozilla
Copy link
Contributor

This updates all of the Dockerfiles with FROM lines using constant tags. There remain several Dockerfiles that take an argument - those are left unchanged.

@gbrownmozilla gbrownmozilla self-assigned this Oct 8, 2021
@gbrownmozilla gbrownmozilla linked an issue Oct 8, 2021 that may be closed by this pull request
@gbrownmozilla gbrownmozilla marked this pull request as draft October 8, 2021 21:28
@@ -1,4 +1,5 @@
FROM python:3.8
# python:3.8
FROM python@sha256:037c262134bc0cffa81606421308eb0dbf5c851c2328ec585983f8c18553966f
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we need something like python:3.8@sha256:037c262134bc0cffa81606421308eb0dbf5c851c2328ec585983f8c18553966f

@escapewindow
Copy link
Contributor

INFO[0001] Invalid repository name (python:3.8), only [a-z0-9-_.] are allowed

Ah, I wonder if [our version of] kaniko doesn't allow for hash pinning, in which case we might not be able to do this.

@gbrownmozilla
Copy link
Contributor Author

fwiw, that format is fine locally,:

$ docker run -t -i python:3.8@sha256:037c262134bc0cffa81606421308eb0dbf5c851c2328ec585983f8c18553966f
Python 3.8.12 (default, Sep 28 2021, 19:06:31) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

@escapewindow
Copy link
Contributor

Yeah. We use kaniko to build our docker images. I believe this is both more secure than running directly on docker, and avoids the whole docker-in-docker issue. But it doesn't support everything that docker supports.

@escapewindow
Copy link
Contributor

Hm, https://github.com/GoogleContainerTools/kaniko/blob/0477900febfacb98b88abdbfaf8bbaeb05f51060/integration/dockerfiles/Dockerfile_test_volume_3#L4 looks promising.
I wonder if it's supported in a newer version of kaniko that we're not using yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pin Dockerfile FROMs to digests
2 participants