Comments (12)
Are you building your own image with the statements above or what are you reffering to?
The configuration at /etc/app/application.properties should be picked up, yes
from docker-image-jodconverter-examples.
IMHO configuration is not working. @EugenMayer you could try to add an additional line before entrypoint in Dockerfile to test it:
RUN echo "server.port=8090" > /etc/app/application.properties
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["-Dspring.config.location=/etc/app/application.properties"]
After running you will see, that application runs on default port 8080.
from docker-image-jodconverter-examples.
yes, @wussup you got the point. configs don't seem to be working.
only one way - build custom image and adjust .yaml settings before
from docker-image-jodconverter-examples.
Please post you entires Dockerfile you build not just some snippets of whatever there might be.
We might have an issue still, but let me invstigate with the informations
from docker-image-jodconverter-examples.
@EugenMayer this is your Dockerfile with my echo to application.properties
# ---------------------------------- setup our needed libreoffice engaged server with newest glibc
# we cannot use the official image since we then cannot have sid and the glibc fix
#FROM openjdk:11.0-jre-slim-stretch as jodconverter-base
FROM debian:sid as jodconverter-base
# backports would only be needed for stretch
#RUN echo "deb http://ftp2.de.debian.org/debian stretch-backports main contrib non-free" > /etc/apt/sources.list.d/debian-backports.list
RUN apt-get update && apt-get -y install \
openjdk-11-jre \
apt-transport-https locales-all libpng16-16 libxinerama1 libgl1-mesa-glx libfontconfig1 libfreetype6 libxrender1 \
libxcb-shm0 libxcb-render0 adduser cpio findutils \
# procps needed for us finding the libreoffice process, see https://github.com/sbraconnier/jodconverter/issues/127#issuecomment-463668183
procps \
# only for stretch
#&& apt-get -y install -t stretch-backports libreoffice --no-install-recommends \
# sid variant
&& apt-get -y install libreoffice --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
ENV JAR_FILE_NAME=app.war
ENV JAR_FILE_BASEDIR=/opt/app
ENV LOG_BASE_DIR=/var/log
COPY bin/docker-entrypoint.sh /docker-entrypoint.sh
RUN mkdir -p ${JAR_FILE_BASEDIR} /etc/app \
&& touch /etc/app/application.properties \
&& chmod +x /docker-entrypoint.sh
RUN echo "server.port=8090" > /etc/app/application.properties
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["-Dspring.config.location=/etc/app/application.properties"]
# ---------------------------------- build our jodconvert builder, so source code with build tools
# TODO: java11 compat yet not given for jodconverter https://github.com/sbraconnier/jodconverter/pull/128
FROM openjdk:11-jdk as jodconverter-builder
RUN apt-get update \
&& apt-get -y install git \
&& git clone https://github.com/sbraconnier/jodconverter /tmp/jodconverter \
&& mkdir /dist
# ---------------------------------- gui builder
FROM jodconverter-builder as jodconverter-gui
WORKDIR /tmp/jodconverter/jodconverter-samples/jodconverter-sample-spring-boot
RUN ../../gradlew build \
&& cp build/libs/*SNAPSHOT.war /dist/jodconverter-gui.war
# ---------------------------------- rest build
FROM jodconverter-builder as jodconverter-rest
WORKDIR /tmp/jodconverter/jodconverter-samples/jodconverter-sample-rest
RUN ../../gradlew build \
&& cp build/libs/*SNAPSHOT.war /dist/jodconverter-rest.war
# ---------------------------------- GUI prod image
FROM jodconverter-base as gui
COPY --from=jodconverter-gui /dist/jodconverter-gui.war ${JAR_FILE_BASEDIR}/${JAR_FILE_NAME}
# ---------------------------------- REST prod image
FROM jodconverter-base as rest
COPY --from=jodconverter-rest /dist/jodconverter-rest.war ${JAR_FILE_BASEDIR}/${JAR_FILE_NAME}
from docker-image-jodconverter-examples.
and even more, simplified test version:
FROM eugenmayer/jodconverter:rest
COPY config/application.properties /etc/app/application.properties
from docker-image-jodconverter-examples.
@EugenMayer @mexekanez guys, please check fix.
from docker-image-jodconverter-examples.
@wussup does it working for you?
from docker-image-jodconverter-examples.
@mexekanez yes, this example starts on port 8090 as specified in application.properties :
# ---------------------------------- setup our needed libreoffice engaged server with newest glibc
# we cannot use the official image since we then cannot have sid and the glibc fix
#FROM openjdk:11.0-jre-slim-stretch as jodconverter-base
FROM debian:sid as jodconverter-base
# backports would only be needed for stretch
#RUN echo "deb http://ftp2.de.debian.org/debian stretch-backports main contrib non-free" > /etc/apt/sources.list.d/debian-backports.list
RUN apt-get update && apt-get -y install \
openjdk-11-jre \
apt-transport-https locales-all libpng16-16 libxinerama1 libgl1-mesa-glx libfontconfig1 libfreetype6 libxrender1 \
libxcb-shm0 libxcb-render0 adduser cpio findutils \
# procps needed for us finding the libreoffice process, see https://github.com/sbraconnier/jodconverter/issues/127#issuecomment-463668183
procps \
# only for stretch
#&& apt-get -y install -t stretch-backports libreoffice --no-install-recommends \
# sid variant
&& apt-get -y install libreoffice --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
ENV JAR_FILE_NAME=app.war
ENV JAR_FILE_BASEDIR=/opt/app
ENV LOG_BASE_DIR=/var/log
COPY bin/docker-entrypoint.sh /docker-entrypoint.sh
RUN mkdir -p ${JAR_FILE_BASEDIR} /etc/app \
&& touch /etc/app/application.properties \
&& chmod +x /docker-entrypoint.sh
RUN echo "server.port=8090" > /etc/app/application.properties
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["--spring.config.additional-location=/etc/app/"]
# ---------------------------------- build our jodconvert builder, so source code with build tools
# TODO: java11 compat yet not given for jodconverter https://github.com/sbraconnier/jodconverter/pull/128
FROM openjdk:11-jdk as jodconverter-builder
RUN apt-get update \
&& apt-get -y install git \
&& git clone https://github.com/sbraconnier/jodconverter /tmp/jodconverter \
&& mkdir /dist
# ---------------------------------- gui builder
FROM jodconverter-builder as jodconverter-gui
WORKDIR /tmp/jodconverter/jodconverter-samples/jodconverter-sample-spring-boot
RUN ../../gradlew build \
&& cp build/libs/*SNAPSHOT.war /dist/jodconverter-gui.war
# ---------------------------------- rest build
FROM jodconverter-builder as jodconverter-rest
WORKDIR /tmp/jodconverter/jodconverter-samples/jodconverter-sample-rest
RUN ../../gradlew build \
&& cp build/libs/*SNAPSHOT.war /dist/jodconverter-rest.war
# ---------------------------------- GUI prod image
FROM jodconverter-base as gui
COPY --from=jodconverter-gui /dist/jodconverter-gui.war ${JAR_FILE_BASEDIR}/${JAR_FILE_NAME}
# ---------------------------------- REST prod image
FROM jodconverter-base as rest
COPY --from=jodconverter-rest /dist/jodconverter-rest.war ${JAR_FILE_BASEDIR}/${JAR_FILE_NAME}
from docker-image-jodconverter-examples.
Also tested in the test environment of my application, now everything is ok, waiting for your feedback.
from docker-image-jodconverter-examples.
Here is explanation https://stackoverflow.com/a/47210661/4141492
from docker-image-jodconverter-examples.
Sorry, took me a while. Thank you for digging that one out and correcting it!
from docker-image-jodconverter-examples.
Related Issues (20)
- Swagger Doc not reachable HOT 1
- :rest docker box fails by default HOT 1
- cors problem HOT 1
- Drop root privileges HOT 1
- Remove swagger, replace by openapi or drop entirely HOT 1
- Missing /etc/app/application.properties triggers startup failure HOT 3
- Adapt Docker Hub publish Policy: Use Versions HOT 2
- Chinese garbled code HOT 2
- The docker image doesn't start HOT 1
- Executing make start-rest won't start HOT 4
- jodconverter fails after 5K conversions HOT 1
- jodconverter has moved to a public organization HOT 20
- Support for arm64 HOT 2
- Whitelabel Error Page HOT 2
- Reactivate the builds of jodconverter-gui/jodconverter-rest when they are Java11 compatible HOT 1
- can not start rest service HOT 3
- Which License
- At times the converter stops reponding...seems to be connected to reaching the maximum tasks per process... HOT 2
- Process recycling leads to defunct process HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-image-jodconverter-examples.