You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
3.1 KiB
89 lines
3.1 KiB
2 years ago
|
FROM phusion/baseimage:bionic-1.0.0
|
||
|
|
||
|
CMD ["/sbin/my_init"]
|
||
|
|
||
|
ENV JAVA_MAJOR_VERSION=11
|
||
|
|
||
|
RUN mkdir -p /src/app
|
||
|
RUN apt-get update \
|
||
|
&& apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \
|
||
|
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
|
||
|
&& locale-gen en_US.UTF-8 \
|
||
|
&& rm -rf /var/lib/apt/lists/*
|
||
|
|
||
|
ENV JAVA_VERSION jdk-11.0.8+10
|
||
|
|
||
|
RUN set -eux; \
|
||
|
ARCH="$(dpkg --print-architecture)"; \
|
||
|
case "${ARCH}" in \
|
||
|
aarch64|arm64) \
|
||
|
ESUM='286c869dbaefda9b470ae71d1250fdecf9f06d8da97c0f7df9021d381d749106'; \
|
||
|
BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_aarch64_linux_hotspot_11.0.8_10.tar.gz'; \
|
||
|
;; \
|
||
|
armhf|armv7l) \
|
||
|
ESUM='ffa627b2d0c6001448bb8f1f24f7c9921dad37e67637f6ed0a9a479e680a3393'; \
|
||
|
BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_arm_linux_hotspot_11.0.8_10.tar.gz'; \
|
||
|
;; \
|
||
|
ppc64el|ppc64le) \
|
||
|
ESUM='89231e1667d7cc4202d1a401497bb287d4eb12281c90c17e2570211cc4e901a3'; \
|
||
|
BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_ppc64le_linux_hotspot_11.0.8_10.tar.gz'; \
|
||
|
;; \
|
||
|
s390x) \
|
||
|
ESUM='dc0e715c17abcb12bedf77c638e58e67d828d3c4bf24a898f0d4b053caaeb25f'; \
|
||
|
BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_s390x_linux_hotspot_11.0.8_10.tar.gz'; \
|
||
|
;; \
|
||
|
amd64|x86_64) \
|
||
|
ESUM='98615b1b369509965a612232622d39b5cefe117d6189179cbad4dcef2ee2f4e1'; \
|
||
|
BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_x64_linux_hotspot_11.0.8_10.tar.gz'; \
|
||
|
;; \
|
||
|
*) \
|
||
|
echo "Unsupported arch: ${ARCH}"; \
|
||
|
exit 1; \
|
||
|
;; \
|
||
|
esac; \
|
||
|
curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \
|
||
|
echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \
|
||
|
mkdir -p /opt/java/openjdk; \
|
||
|
cd /opt/java/openjdk; \
|
||
|
tar -xf /tmp/openjdk.tar.gz --strip-components=1; \
|
||
|
rm -rf /tmp/openjdk.tar.gz;
|
||
|
|
||
|
ENV JAVA_HOME=/opt/java/openjdk \
|
||
|
PATH="/opt/java/openjdk/bin:$PATH"
|
||
|
|
||
|
RUN apt-get update && \
|
||
|
apt-get install -y ffmpeg && \
|
||
|
apt-get clean;
|
||
|
|
||
|
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
||
|
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
|
||
|
apt-get update && \
|
||
|
apt-get install -y yarn;
|
||
|
|
||
|
|
||
|
WORKDIR /src/app
|
||
|
|
||
|
COPY . /src/app
|
||
|
|
||
|
RUN yarn global add nodemon
|
||
|
# update
|
||
|
RUN apt-get update
|
||
|
# install curl
|
||
|
RUN apt-get install -y curl
|
||
|
# get install script and pass it to execute:
|
||
|
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash
|
||
|
# and install node
|
||
|
RUN apt-get install -y nodejs
|
||
|
# confirm that it was successful
|
||
|
RUN node -v
|
||
|
# npm installs automatically
|
||
|
RUN npm -v
|
||
|
|
||
|
ENV TINI_VERSION v0.19.0
|
||
|
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
|
||
|
RUN chmod +x /tini
|
||
|
ENTRYPOINT ["/tini", "--"]
|
||
|
|
||
|
EXPOSE 3005
|
||
|
|
||
|
CMD [ "nodemon", "app.js" ]
|