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

Adding Personal Package Archives (PPAs) #402

Open
mizvol opened this Issue Sep 14, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@mizvol
Copy link

mizvol commented Sep 14, 2018

Currently, it is impossible to add PPAs through postBuild and apt.txt.
The reason is that apt.txt is executed before postBuild, so even if a PPA is added to the postBuild, the package cannot be found.

In some cases, there is a need for software that is distributed through PPAs. For example, if one needs to install MongoDB, it is required to add a PPA and create a list file. Only then, the package is becoming available for installation.

@betatim

This comment has been minimized.

Copy link
Collaborator

betatim commented Sep 17, 2018

#192 is somewhat related as the usecase for sudo in postBuild was in part motivated by wanting to add PPAs.

Right now the policy is that not enough people want to have custom PPAs which is why there is no native way in repo2docker to do this.

A way to solve this would be to invent some syntax for apt.txt to let people specify the PPAs there, that seems like a lot of work in terms of maintenance and inventing our own standards. Is there a better way someone can think of?

For now the recommendation is to make your own Dockerfile if you need this functionality.

mongodb seems to be available via conda-forge, maybe that is easier as a way to install it compared to rolling your own Dockerfile?

@mizvol

This comment has been minimized.

Copy link

mizvol commented Sep 17, 2018

Thanks, @betatim. Your solution worked for me.
I've managed to install mongodb by adding the following line to postBuild:
conda install -c anaconda mongodb

Although, there is another issue. To use mongodb, I need to start a service service mongod start. I tried starting the service from MyBinder terminal and by adding the command to postBuild. In both cases I get an error mongod: unrecognized service.

Is it possible to start a service in MyBinder?

@betatim

This comment has been minimized.

Copy link
Collaborator

betatim commented Sep 17, 2018

We support environment.yml (check out https://github.com/binder-examples/conda) so I would list mongodb there instead of using postBuild.

To start a service like a DB we support a special file called start, see https://repo2docker.readthedocs.io/en/latest/config_files.html#start. We discovered that this was broken, got fixed in #399 which should be deployed on Tuesday. You could already test it locally with repo2docker installed from master.

@mizvol

This comment has been minimized.

Copy link

mizvol commented Sep 18, 2018

Indeed, start script works now (tested locally). Nonetheless, the error mongod: unrecognized service still pops up in the logs.

No problem with MyBinder here though. Seems like conda-forge MongoDB package does not contain MongoDB server. So, as you proposed before, the only way to install MongoDB is to create a custom Dockerfile and install MongoDB properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment