2019-11-14 12:50:37 +00:00
|
|
|
#When you are building, name it appsmith-server which is how it is referenced in docker-compose.yml
|
|
|
|
|
|
2022-04-21 08:26:49 +00:00
|
|
|
FROM adoptopenjdk/openjdk11:jdk-11.0.10_9-alpine
|
|
|
|
|
|
|
|
|
|
RUN ${JAVA_HOME}/bin/jlink --module-path jmods --add-modules jdk.jcmd --output /jcmd
|
|
|
|
|
|
2021-05-17 13:12:54 +00:00
|
|
|
FROM adoptopenjdk/openjdk11:jre-11.0.10_9-alpine
|
2019-11-14 12:50:37 +00:00
|
|
|
|
2022-04-21 08:26:49 +00:00
|
|
|
COPY --from=0 /jcmd /jcmd
|
|
|
|
|
|
2019-11-14 12:50:37 +00:00
|
|
|
LABEL maintainer="tech@appsmith.com"
|
|
|
|
|
|
|
|
|
|
VOLUME /tmp
|
|
|
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
|
2021-09-21 09:50:51 +00:00
|
|
|
ARG JAR_FILE=./dist/server-*.jar
|
|
|
|
|
ARG PLUGIN_JARS=./dist/plugins/*.jar
|
2020-11-19 03:24:03 +00:00
|
|
|
ARG APPSMITH_SEGMENT_CE_KEY
|
|
|
|
|
ENV APPSMITH_SEGMENT_CE_KEY=${APPSMITH_SEGMENT_CE_KEY}
|
2019-11-14 12:50:37 +00:00
|
|
|
|
|
|
|
|
#Create the plugins directory
|
|
|
|
|
RUN mkdir -p /plugins
|
|
|
|
|
|
2021-10-08 17:17:25 +00:00
|
|
|
# Add entrypoint script and make it executable.
|
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
|
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
|
|
2019-11-14 12:50:37 +00:00
|
|
|
#Add the jar to the container. Always keep this at the end. This is to ensure that all the things that can be taken
|
|
|
|
|
#care of via the cache happens. The following statement would lead to copy because of change in hash value
|
|
|
|
|
COPY ${JAR_FILE} server.jar
|
|
|
|
|
COPY ${PLUGIN_JARS} /plugins/
|
2022-05-06 06:15:56 +00:00
|
|
|
HEALTHCHECK --interval=15s --timeout=15s --start-period=15s --retries=3 CMD wget --no-verbose --spider http://localhost:8080/api/v1/users/me/ || exit 1
|
2021-10-20 09:47:34 +00:00
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|