mylogger/Dockerfile

39 lines
788 B
Docker
Raw Normal View History

2023-04-08 13:08:37 +00:00
FROM debian:bullseye-slim
ARG DEBIAN_FRONTEND=noninteractive
# NodeJs
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
ca-certificates \
gnupg2 \
git \
2023-04-10 12:11:36 +00:00
&& curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
2023-04-08 13:08:37 +00:00
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
2023-04-10 12:11:36 +00:00
# MyLogger
2023-04-08 13:08:37 +00:00
2023-04-10 12:11:36 +00:00
WORKDIR /mylogger
2023-04-08 13:08:37 +00:00
COPY package.json package-lock.json ./
RUN npm install --only=prod \
&& git clone https://github.com/juan-ferrer-toribio/zongji.git \
&& (cd zongji && npm install --only=prod)
2023-04-08 13:08:37 +00:00
ARG BUILD_ID=unknown
ARG VERSION
ENV VERSION $VERSION
RUN echo $VERSION
COPY \
LICENSE \
README.md \
mylogger.js \
index.js \
config.yml \
./
2023-04-10 12:11:36 +00:00
CMD ["node", "index.js"]