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.

63 lines
1.3 KiB

3 years ago
#ARG NODE_VERSION=6.17.1
#FROM mhart/alpine-node:${NODE_VERSION}
3 years ago
FROM node:16-alpine
3 years ago
LABEL \
org.opencontainers.image.title="Docker Image of nodejs4poc" \
org.opencontainers.image.authors="Swarmlab.io <rootapostolos@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
3 years ago
ARG NODEPROJECT1src=poc-datacollector/playground-client
3 years ago
ARG NODEPROJECT1=playground-client
ENV USER1 ${USER1}
3 years ago
ENV NODEPROJECTSRC ${NODEPROJECT1src}
3 years ago
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"]