FROM inistcnrs/lodex-workers:9.2.3 AS build1 #FROM golang:1.17.5-alpine3.15 as build2 # System setup RUN apk update && \ apk add git curl build-base autoconf automake libtool FROM node:14-alpine3.15 AS release COPY --from=build1 /app /app #COPY --from=build2 /export /usr WORKDIR /app # see .dockerignore to know all copied files COPY ./config.json ./package-app.json ./chmod-all ./docker-entrypoint.sh /app/ COPY ./public/requirements.txt ./public/IRC3sp.pl ./public/irc3sp.ini ./public/irc3_wrapper.sh ./public/CoL.txt /app/public/ RUN apk add --update-cache --no-cache \ su-exec \ bash \ git \ openssh \ build-base \ cmake \ openssl-dev \ perl \ perl-json \ ca-certificates \ rust \ curl \ tini \ cargo \ && \ mv package-app.json package.json && \ npm install --production && \ npm cache clean --force && \ npm prune --production && \ echo '{ \ "httpPort": 31976, \ "configPath": "/app/config.json", \ "dataPath": "/app/public" \ }' > /etc/ezmaster.json && \ sed -i -e "s/daemon:x:2:2/daemon:x:1:1/" /etc/passwd && \ sed -i -e "s/daemon:x:2:/daemon:x:1:/" /etc/group && \ sed -i -e "s/bin:x:1:1/bin:x:2:2/" /etc/passwd && \ sed -i -e "s/bin:x:1:/bin:x:2:/" /etc/group && \ mkdir -p /sbin/.npm /sbin/.config /sbin/.local && \ chown -R daemon:daemon /app /tmp /sbin/.npm /sbin/.config /sbin/.local EXPOSE 31976 ENTRYPOINT ["/sbin/tini", "-g", "--"] CMD [ "/app/docker-entrypoint.sh" ]