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

Docker image #117

Closed
krezovic opened this issue Apr 21, 2020 · 6 comments
Closed

Docker image #117

krezovic opened this issue Apr 21, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@krezovic
Copy link

This is more of an info. Feel free to either include Dockerfile here, ignore and close the issue, or link to the docker repository.

I've created an image for this module and published it at docker hub. This prevents me from installing tons of packages on a server where they shouldn't be needed, so I can automate deployment of nexus3.

FROM python:3-alpine

USER root

RUN apk add --no-cache --update --virtual .build-deps build-base libffi-dev openssl-dev && \
    pip install nexus3-cli && \
    apk del .build-deps && \
    rm -rf ~/.cache/pip

https://hub.docker.com/r/krezovic/nexus3-cli

@thiagofigueiro
Copy link
Owner

That's great, @krezovic - I think I'll create a separate project to build this weekly so we always have a docker image with the latest security updates.

I also want to add an ENTRYPOINT so one can pass direct arguments to the utility.

What do you do when you have to transfer files? Do you manually mount a volume to $(pwd)?

@thiagofigueiro thiagofigueiro added the enhancement New feature or request label Apr 22, 2020
@krezovic
Copy link
Author

Hi, your suggestion about entrypoint sounds good.

As for the file transfer, I'm not sure how it works as I haven't tried it. I've only mounted user's home dir (USER root), to be able to store nexus login credentials inside my own home dir.

@thiagofigueiro
Copy link
Owner

With regards to authentication, another option would be to make the login options global so that they can be set as environment variables for any subcommand.

If the docker container then has access to these variables, the utility could use the credentials without having to rely on a config file.

@krezovic
Copy link
Author

Nice, I did not know all commands support the login options. It can be automated easily enough with a bash script.

@thiagofigueiro
Copy link
Owner

Any options can be passed as an environment variable - this comes for free with click.

But the login options are currently only accepted with the login command. It should be easy enough to make them global.

@thiagofigueiro
Copy link
Owner

Added the suggested dockerfile and a follow-up issue #119

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

No branches or pull requests

2 participants