Skip to content
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

Make registry of used base image explicit #348

Open
nuest opened this issue Aug 1, 2019 · 3 comments
Open

Make registry of used base image explicit #348

nuest opened this issue Aug 1, 2019 · 3 comments

Comments

@nuest
Copy link

nuest commented Aug 1, 2019

I've been playing around with podman and Rocker images a bit, see README in https://github.com/nuest/rodman

Although is a known issue with RStudio in containers started with podman, see #202, running the R prompt was no problem at all. Building the image required a small fix: prepending the registry name in the FROM instruction, which is added by default for the Docker CLI:

For example, the r-ver:3.6.0 Dockerfile would start with

FROM docker.io/library/debian:stretch

The rstudio:3.6.0 file would start with

FROM docker.io/rocker/r-ver:3.6.0

What do you think about adding the registry and library explicitly to all Dockerfiles?

Advantages I see:

  • images can be build with podman without any change (potentially also with other builders?)
  • the origin of the used base image is made more explicit
@cboettig
Copy link
Member

cboettig commented Aug 1, 2019

Interesting. I'm actually not familiar with that syntax, though I see the logic, it's not mentioned in Dockerfile best practices (https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) or documented in the Dockerfile reference (https://docs.docker.com/engine/reference/builder/#from). I'm just wary of adopting a syntax that might be incompatible with other tools or confuse users.

There are also some side-effects to this behavior that might be undesirable. For instance, we often test the stack by building the entire stack locally. If I build a local r-ver:3.6.0 and then build the rstudio recipe, Docker will use the local copy I just build as the base, rather than pulling a new one from Hub. (Similarly users have their own mirrors of the rocker images in a private registry). Hardwiring the registry has a kind of logic to it, but it's also a non-trivial departure from the more 'swappable' registry built into Docker's design from the outset. Not trying to shoot this down, but just think through the consequences.

Does podman not have the ability to just set docker.io as a 'default' registry?

@cboettig
Copy link
Member

cboettig commented Aug 1, 2019

p.s.

how about adding docker.io to the [registries.search] of your /etc/containers/registries.conf file? see https://medium.com/@ganeshmani009/replacing-docker-with-podman-power-of-podman-cloudnweb-23cfb7541538

pps. podman does look very cool, will be interested to check out what you're doing with rodman!

@FelixErnst
Copy link

As @cboettig mentioned I also get error while running rocker/rstudio. The startup service of the services is not working.

Just to let you know: A similar issue is reported, if I try to recreate the build process for the rocker/rstudio image. The installation of the .deb quits with the same issue stating a permission problem. However, it is not clear to me which permission do collide. It also does not make a difference, whether I start with the docker image of r-ver or build it with buildah from debian:buster.

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

No branches or pull requests

3 participants