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.

82 lines
1.8 KiB

3 years ago
#ARG NODE_VERSION=6.17.1
#FROM mhart/alpine-node:${NODE_VERSION}
3 years ago
FROM node:16-alpine3.13
3 years ago
LABEL \
org.opencontainers.image.title="Docker Image of dummyservice4poc" \
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
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
3 years ago
# --- fluent ----- uncomment --------------------------
ARG NODEPROJECT2src=poc-datacollector/WriteToMongo/fluent/
ARG NODEPROJECT2=fluent
ENV NODEPROJECTSRC2 ${NODEPROJECT2src}
ENV NODEPROJECT2 ${NODEPROJECT2}
COPY ${NODEPROJECTSRC2} /home/${USER1}/${NODEPROJECT2}
3 years ago
USER root
3 years ago
RUN chown -R ${USER1}.${USER1} /home/${USER1}
3 years ago
RUN /home/${USER1}/${NODEPROJECT2}/install-fluent.sh
3 years ago
USER ${USER1}
3 years ago
WORKDIR /home/${USER1}
USER root
USER ${USER1}
WORKDIR /home/${dockeruser}
VOLUME ["/home/${dockeruser}"]
3 years ago
EXPOSE 3001
3 years ago
#CMD ["tail","-f","/dev/null"]
CMD ["/home/node/dummyservice/start-server.sh"]