How to convert this to docker

We want to integrate Nexus 3 Opensource Edition into our toolchain. Nexus is an artifactory for npm, Docker Registry, maven, nuget, etc. We want to use docker containers for everything.

Problem: Nexus doesn’t offer a CLI based utility to set configuration parameters. That is sad – but it’s a fact. So, we need to do it the “Nexus” way. Nexus can be scripted via Java/Groovy Scripts. A very kind person offers a ready to use ansible based solution for all configuration settings: https://github.com/savoirfairelinux/ansible-nexus3-oss

Test: Find the file “nexus_install.yml”. You can see that the installation is not Docker based. It will install Nexus via tar file on the native host machine. Your task is to rewrite this file to use a Docker container for the installation. Please do not write your own Docker file. We want to use the “official” image from https://hub.docker.com/r/sonatype/nexus3 . For this moment we don’t need fancy Nexus installation modes. Just modify the Nexus administrator password by using the existing ansible tasks.

Sounds like you are asking for someone to do your your homework - I’m not sure that is very effective.

If you have any questions regarding the GitHub and docker repos, contact their respective authors/maintainers.

If you have specific questions about ansible, feel free to ask here.
But make sure to give enough details.

This repo creates the Nexus server on the normal machine.
But I want to change it to docker container.
For that, used the Nexus image directly.

But for doing the configuration, how to apply the same in the docker?

Any references?

Someone ("savoirfairelinux") created a repository of ansible code to
install Nexus.
But you want that in Docker. Fine.
But how you do that isn't an ansible problem.
Ansible is just an automation tool.
You will have to come up with the things that you want automated.

Again, please reach out to "savoirfairelinux" or "sonatype" for help.

No, I will go with docker only.
But , the configuration part I want to use the same ansible part to point to container we will create.

Container I will create from ansible.
Like below

  • name: Create Container
    docker_container:
    name: “sonatype/nexus3”
    image: “{{ image }}”
    ports:
  • “{{ src_port }}:{{ dest_port }}”
    volumes:
  • “{{ src_vol }}:{{ dest_vol }}”
    privileged: “{{ privileged }}”