Open pepjo opened 1 year ago
I've tried building my own docker image using JRE 11 and it seems to work, I used:
FROM quay.io/azavea/franklin:adf474c AS franklin
FROM openjdk:11-jre-slim
RUN \
addgroup --system franklin \
&& adduser --system --disabled-login --disabled-password \
--home /var/lib/franklin \
--shell /sbin/nologin \
--ingroup franklin \
-u 1000 \
franklin
COPY --from=franklin /var/lib/franklin/ /var/lib/franklin/
USER franklin
WORKDIR /var/lib/franklin
ENTRYPOINT ["java", "-XX:+UnlockExperimentalVMOptions", "-jar", "franklin-api-assembly.jar"]
I had to remove UseCGroupMemoryLimitForHeap
since it is no longer supported.
I am happy to make a PR with the changes.
I had the same issue but had to make some minor changes to the application/Dockerfile.dev and docker-compose.yml
I had to add the data-files directory (could use copy too)
FROM quay.io/azavea/franklin:adf474c AS franklin
FROM openjdk:11-jre-slim
RUN \
addgroup --system franklin \
&& adduser --system --disabled-login --disabled-password \
--home /var/lib/franklin \
--shell /sbin/nologin \
--ingroup franklin \
-u 1000 \
franklin
COPY --from=franklin /var/lib/franklin/ /var/lib/franklin/
USER franklin
WORKDIR /var/lib/franklin
ADD ./data-files /var/lib/data-files
ENTRYPOINT ["java", "-XX:+UnlockExperimentalVMOptions", "-jar", "franklin-api-assembly.jar"]
and the command in the docker-compose.yml needed to be updated to:
version: '2.3'
services:
franklin:
container_name: franklin-app
build:
context: .
dockerfile: application/Dockerfile.dev
environment:
- PGHOST=pgstac
- PGDATABASE=postgis
- PGUSER=franklin
- PGPASSWORD=franklin
- API_STAC_HIERARCHY=data-files/hierarchy_example.json
ports:
- "9090:9090"
volumes:
- ./:/opt/src/
command: serve
Describe the bug When running Franklin from the published docker image I get the following error:
which seems to indicate that it's trying to run on Java 8 but needs Java 11. This is confirmed by looking at the Dockerfile here: https://github.com/azavea/franklin/blob/master/application/Dockerfile
Expected behavior The docker image should come with the right version of docker
Additional context I've tried the two latest images:
quay.io/azavea/franklin:e844dc8
andquay.io/azavea/franklin:adf474c