BioContainers / containers

Bioinformatics containers
http://biocontainers.pro
Apache License 2.0
685 stars 248 forks source link

:latest docker containers removed #297

Closed PhilPalmer closed 6 years ago

PhilPalmer commented 6 years ago

Hi,

The company where I work uses lots of your Docker images on our platform. All of them were specified with the :latest tag. Yesterday it seems like all of your Docker containers with the latest tag were removed and so the containers all stopped working for us because they could not be found.

Do you know why all of docker containers with the latest tag were removed?

I tried rebuilding all of the docker containers using the Dockerfiles from this repository however all of them were built from the base image biocontainers/biocontainers:latest. As this image no longer exists I had to build them from the base image biocontainers/biocontainers:v1.0.0_cv4. Now when I try running them over the platform I get the following error:

 dea6dd7e30dd: Download complete
  dea6dd7e30dd: Pull complete
  5f8154b871f1: Pull complete
  06b022b2c83f: Pull complete
  9b2c8a4ecb8d: Pull complete
  7b30ef549338: Pull complete
  9b34fc643fc1: Pull complete
  52c0fab077ab: Pull complete
  db8c4567241d: Pull complete
  db7cd43b1320: Pull complete
  c0db2ee4b7f4: Pull complete
  fc762ded1dd7: Pull complete
  e208c24d23ae: Pull complete
  7942fa61db88: Pull complete
  17859929e563: Pull complete
  Digest: sha256:47601df64fcce1782df1d3d9492480f19f5ce8b13cfd9d28c0ccc7e8fd13fd16
  Status: Downloaded newer image for lifebitai/fastqc:latest
  docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "chdir to cwd (\"/home/ec2-user/work/99/3461ce39651ba68c1f062f83f4458e\") set in config.json failed: permission denied": unknown.
  time="2018-11-15T13:58:51Z" level=error msg="error waiting for container: context canceled"

I can run them locally fine. But not over the platform. Looks like the problem may be to do with executable permisions for one (or more) of the file(s). However it only occurs on the platform and not locally and occurs immediately after the container is pulled.

Do you have any idea what might be causing this issue? What is the difference between the biocontainers/biocontainers:latest and biocontainers/biocontainers:v1.0.0_cv4 images? Would it be possible to add back the images with the latest tag?

Thanks in advance, any help would be much appreciated

ypriverol commented 6 years ago

Dear @PhilPalmer :

the community has been discussing a lot about the latest tag. The problem with the latest tag is that is useful but it is it really bad for reproducibility. For example, your pipelines can start failing if we update to a new version of the tool in registry and you are using the latest.

We are encouraging to use the right tag and not the latest. Then, we don;t have differences between: biocontainers/biocontainers:latest and biocontainers/biocontainers:v1.0.0_cv4.

Regards Yasset

osallou commented 6 years ago

the latest tags were removed because a bad practive. With latest, you do not know which version you are running. If an older release is rebuilt (for a fix for example), it will become the latest, though not being the latest version. You should always use tagged versions.

osallou commented 6 years ago

@ypriverol @Raynooo To rebuilt containers however, some Dockerfiles may still refer to biocontainers/biocontainers:latest (have not checked). If true, we should update all those Dockerfiles.

osallou commented 6 years ago

@PhilPalmer: 1) you don't need to rebuild containers, only to use tagged version of containers 2) regarding your error, is it a directory change that fails. you try to go to dir /home/ec2-user (a volume mount?). By default, containers are executed as user "biocontainer", so it may not have the rights to go in this directory. You can still force user root if needed ( docker run -u root ....)

osallou commented 6 years ago

waiting to fix older dockerfiles that refers to biocontainer/biocontainers:latest , I gonna add latest back to the base image

PhilPalmer commented 6 years ago

Thanks for your quick replies. I can give you a list of the containers I saw still had the biocontainers/biocontainers:latest as a base image, it was all but one of the images I checked.

  1. And unfortunately, our platform only supports the latest tag. Not ideal but not a problem until now, hence why I rebuilt them.
  2. I suspect that could well be the problem. I'm not sure why it has only just started occurring through. Do you know of any way I could change the Dockerfile instead of the docker run command to prevent this issue?
osallou commented 6 years ago

In Dockerfile, you just need to change

USER biodocker

to

USER root
PhilPalmer commented 6 years ago

Okay great thanks, I'll give that a go

osallou commented 6 years ago

Regarding fact you need latest, all you need is to pull tagged image and add a latest above

docker pull myimage:myversion
docker tag myimage:myversion myimage:latest
PhilPalmer commented 6 years ago

Thanks for your help the USER root worked a charm for a quick fix. I will have to have a look into the alternatives