Skip to content

Commit

Permalink
Base the docker image on alpine directly
Browse files Browse the repository at this point in the history
From the OpenJDK team:

> The OpenJDK port for Alpine is not in a supported release by OpenJDK, since it is not in the mainline code base. It is only available as early access builds of OpenJDK Project Portola. See also [this comment](docker-library/openjdk#235 (comment)). So this image follows what is available from the OpenJDK project's maintainers.
>
> What this means is that Alpine based images are only released for early access release versions of OpenJDK. Once a particular release becomes a "General-Availability" release, the Alpine version is dropped from the "Supported Tags"; they are still available to pull, but will no longer be updated.
  • Loading branch information
jakzal committed May 7, 2021
1 parent 8f1a232 commit c865bc8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
17 changes: 13 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
FROM openjdk:8-jdk-alpine
FROM alpine:3.13

ENV JAVA_OPTS=""
LABEL maintainer="VLINGO XOOM Team <info@vlingo.io>"

ENV JAVA_HOME=/usr/lib/jvm/default-jvm/
ENV PATH=${JAVA_HOME}/bin:$PATH
ENV XOOM_ENV="env"

ADD ./target/xoom-schemata-*-jar-with-dependencies.jar /app.jar
ADD ./target/xoom-schemata-*-jar-with-dependencies.jar /schemata/xoom-schemata.jar

RUN addgroup -S xoom && adduser -S -D -s /sbin/nologin -h /schemata -G xoom xoom \
&& apk add --no-cache bash openjdk8 \
&& chown -R xoom:xoom /schemata

ENTRYPOINT exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar $XOOM_ENV
WORKDIR /schemata
CMD java -jar /schemata/xoom-schemata.jar $XOOM_ENV
USER xoom
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ The VLINGO XOOM Schema Registry.

## Quick Start

### Docker

The quickest way to run XOOM Schemata is to use the [docker image](https://hub.docker.com/r/vlingo/xoom-schemata)
published by the VLINGO XOOM Team:

```bash
docker run -it --rm -eXOOM_ENV=dev -p '9019:9019' vlingo/xoom-schemata
```

### Maven

:warning: Make sure you are using a Java 8 JDK.

Build <pre><code>& "<b>{yourInstallPath}</b>\xoom-schemata\mvnw.cmd" clean package -Pfrontend -f "<b>{yourInstallPath}</b>\xoom-schemata\pom.xml"</code></pre>
Expand Down Expand Up @@ -40,9 +51,9 @@ The maven build takes care of the following:
* Run the UI build (`npm run export` in `src/main/frontend`) [Maven Profile 'frontend']
* Package the backend, frontend and dependencies within a fat jar

#### Docker Build:
After building, you can optionally build the docker container with `docker build . -t vlingo/xoom-schemata`.
#### Docker Build

After building, you can optionally build the docker container with `docker build . -t vlingo/xoom-schemata`.

### Run

Expand Down

0 comments on commit c865bc8

Please sign in to comment.