Skip to content

Commit 0eefa2b

Browse files
committed
Merge branch 'upgrade-to-temurin'
Closes #17
2 parents 51d4314 + 43853e1 commit 0eefa2b

File tree

2 files changed

+17
-29
lines changed

2 files changed

+17
-29
lines changed

Dockerfile

+3-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Download, extract Nexus to /tmp/sonatype/nexus
2-
FROM debian:buster-slim as downloader
2+
FROM eclipse-temurin:8-jre-jammy as downloader
33

4-
ARG NEXUS_VERSION=3.38.1-01
4+
ARG NEXUS_VERSION=3.40.1-01
55
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
66

77
# Download Nexus and other stuff we need later
@@ -25,28 +25,13 @@ RUN wget --quiet --output-document=/tmp/nexus.tar.gz "${NEXUS_DOWNLOAD_URL}" &&
2525
# Runtime image
2626
# Logic adapted from official Dockerfile
2727
# https://github.com/sonatype/docker-nexus3/blob/master/Dockerfile
28-
FROM debian:buster-slim
28+
FROM eclipse-temurin:8-jre-jammy
2929

3030
# Image metadata
3131
# git commit
3232
LABEL org.opencontainers.image.revision="-"
3333
LABEL org.opencontainers.image.source="https://github.com/klo2k/nexus3-docker"
3434

35-
# Install Java 8
36-
ARG DEBIAN_FRONTEND=noninteractive
37-
RUN apt update && \
38-
# Add AdoptOpenJDK repo
39-
apt install --yes apt-transport-https ca-certificates gnupg software-properties-common wget && \
40-
wget --quiet --output-document=- https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add - && \
41-
add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ && \
42-
# Work-around adoptopenjdk-8-hotspot-jre installation error
43-
mkdir --parent /usr/share/man/man1/ && \
44-
# Install JRE 8 along with missing dependency
45-
apt update && apt install --yes adoptopenjdk-8-hotspot-jre libatomic1 && \
46-
# Clean-up
47-
apt purge --yes apt-transport-https gnupg software-properties-common wget && \
48-
apt autoremove --yes && apt clean
49-
5035
# Setup: Rename App, Data and Work directory per official image
5136
# App directory (/opt/sonatype/nexus)
5237
COPY --from=downloader /tmp/sonatype /opt/sonatype

Readme.md

+14-11
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ So I'm creating one and sharing it with everyone :-) .
1111

1212

1313

14-
# Running
15-
```
14+
## Running
15+
16+
```bash
1617
docker run -d -p 8081:8081 --name nexus klo2k/nexus3
1718
```
1819

1920

2021

2122

22-
# Building with "docker buildx" locally
23-
Initialise [buildx](https://docs.docker.com/buildx/working-with-buildx/), if you're on a x64 machine:
24-
```
25-
# Enable experimental mode
26-
export DOCKER_CLI_EXPERIMENTAL=enabled
23+
## Building with "docker buildx" locally
2724

25+
Initialise [buildx](https://docs.docker.com/desktop/multi-arch/), if you're on a x64 machine:
26+
27+
```bash
2828
# Enable ARM support
29-
docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
29+
docker run --rm --privileged multiarch/qemu-user-static --reset --persistent yes
3030

3131
# Create 'mybuilder' if not exist, set as default builder
3232
docker buildx inspect mybuilder||docker buildx create --name mybuilder
@@ -37,7 +37,8 @@ docker buildx inspect --bootstrap
3737
```
3838

3939
Build ARM 32-bit (armv7l):
40-
```
40+
41+
```bash
4142
docker buildx build --pull \
4243
--platform "linux/arm/v7" \
4344
--tag "klo2k/nexus3" \
@@ -46,7 +47,8 @@ docker buildx build --pull \
4647
```
4748

4849
Build ARM 64-bit (aarch64):
49-
```
50+
51+
```bash
5052
docker buildx build --pull \
5153
--platform "linux/arm64" \
5254
--tag "klo2k/nexus3" \
@@ -57,7 +59,8 @@ docker buildx build --pull \
5759

5860

5961

60-
# Credits
62+
## Credits
63+
6164
- *Nexus Team*: For the awesome repo, and their [Dockerfile](https://github.com/sonatype/docker-nexus3/blob/master/Dockerfile)
6265
- *Dan Rollo (bhamail)*: For the [jna-platform jar hack](https://bhamail.github.io/pinexus/nexussetup.html)
6366
- *Henry Wang (HenryQW)*: For [Docker buildx Github Action](https://www.henry.wang/2019/12/05/arm-dockerhub.html)

0 commit comments

Comments
 (0)