#ARG NODE_VERSION=6.17.1 #FROM mhart/alpine-node:${NODE_VERSION} FROM node:16-alpine3.13 LABEL \ org.opencontainers.image.title="Docker Image of dummyservice4poc" \ org.opencontainers.image.authors="Swarmlab.io " #ENV PATH=/usr/local/texlive/bin/x86_64-linuxmusl:/usr/local/texlive/2020/bin/x86_64-linuxmusl:${PATH} ENV dockeruser node ENV USERhome=${dockeruser} ENV UID=12345 ENV GID=23456 #RUN addgroup -S node \ # && adduser -D -g "" -h "/home/${USERhome}" -G "${USERhome}" -u "${UID}" "${USERhome}" COPY \ setup.sh \ extrapackages \ repositories \ /root/ # -------- next line is in setup.sh ------ # ----------edit if not alpine ---------- # copy repositories /etc/apk/repositories # -------------------------------------- RUN /root/setup.sh # nodejs npm install --- opencv----- uncomment -------------------------- ARG USER1=node ARG NODEPROJECT1src=poc-datacollector/dummyservice ARG NODEPROJECT1=dummyservice ENV USER1 ${USER1} ENV NODEPROJECTSRC ${NODEPROJECT1src} ENV NODEPROJECT ${NODEPROJECT1} COPY ${NODEPROJECTSRC} /home/${USER1}/${NODEPROJECT} RUN chown -R ${USER1}.${USER1} /home/${USER1} USER ${USER1} RUN /home/${USER1}/${NODEPROJECT}/install-dummyservice.sh # --- fluent ----- uncomment -------------------------- ARG NODEPROJECT2src=poc-datacollector/WriteToMongo/fluent/ ARG NODEPROJECT2=fluent ENV NODEPROJECTSRC2 ${NODEPROJECT2src} ENV NODEPROJECT2 ${NODEPROJECT2} COPY ${NODEPROJECTSRC2} /home/${USER1}/${NODEPROJECT2} USER root RUN chown -R ${USER1}.${USER1} /home/${USER1} RUN /home/${USER1}/${NODEPROJECT2}/install-fluent.sh USER ${USER1} WORKDIR /home/${USER1} USER root USER ${USER1} WORKDIR /home/${dockeruser} VOLUME ["/home/${dockeruser}"] EXPOSE 8080 #CMD ["tail","-f","/dev/null"] CMD ["/home/node/dummyservice/start-server.sh"]