#ARG NODE_VERSION=6.17.1 #FROM mhart/alpine-node:${NODE_VERSION} FROM 16-alpine LABEL \ org.opencontainers.image.title="Docker Image of nodejs4poc" \ 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/playground-client ARG NODEPROJECT1=playground-client 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-npm.sh WORKDIR /home/${USER1} USER root USER ${USER1} WORKDIR /home/${dockeruser} VOLUME ["/home/${dockeruser}"] EXPOSE 8080 CMD ["tail","-f","/dev/null"]