mycdc/assets/Dockerfile.consumer

34 lines
766 B
Docker

FROM debian:bookworm-slim
ARG DEBIAN_FRONTEND=noninteractive
# NodeJs
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
ca-certificates \
gnupg2 \
git \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
# Consumer
WORKDIR /mycdc
COPY package.json package-lock.json ./
RUN npm install --omit=dev --no-audit --prefer-offline \
&& git clone --depth 1 --branch fix-143 https://github.com/juan-ferrer-toribio/zongji.git \
&& (cd zongji && npm install --omit=dev)
COPY lib \
config \
queues \
LICENSE \
README.md \
consumer.js \
./
CMD ["node", "consumer.js"]