To build the “sonatype/nexus3” Docker image from the Dockerfile on an ARM64 or (linux/arm64/v8) machine, you can follow these steps:
- Clone the repository containing the Dockerfile by running the following command:
git clone https://github.com/sonatype/docker-nexus3.git
- Navigate to the directory containing the Dockerfile by running the following command:
cd docker-nexus3
- Build the Docker image from the Dockerfile by running the following command:
docker buildx build --platform linux/arm64 -t sonatype/nexus3 .
- Create docker volume for nexus data collection:
docker create volume nexus_data
- Create docker container:
docker run -d -p 8081:8081 -v nexus_data:/nexus-data --restart=always --name nexus sonatype/nexus3