Open sality24 opened 6 years ago
tell me what to do to correct the error?
Please folk and try to custom Dockerfile this is because version of nodejs
FROM phusion/baseimage:latest
MAINTAINER MLstate <contact@mlstate.com>
ENV HOME /root
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
RUN sed 's/main$/main universe/' -i /etc/apt/sources.list
RUN DEBIAN_FRONTEND=noninteractive apt-get -y -q update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y -q install python-software-properties g++ make git curl
#RUN curl -sL https://deb.nodesource.com/setup_5.x | setuser root bash -
#RUN DEBIAN_FRONTEND=noninteractive apt-get -y -q install nodejs && \
# apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN setuser root apt-get -y -q install nodejs
RUN ln -s /usr/bin/nodejs /usr/bin/node
RUN setuser root apt-get -y -q install npm
RUN setuser root npm install -g n
RUN setuser root n stable
# Mount /etc/peps for TLS certificates
VOLUME ["/etc/peps"]
# Install Haraka
RUN setuser root npm install --unsafe-perm --verbose -g Haraka
RUN setuser root haraka -i /usr/local/haraka
# Configure domain name
ADD ./domain /usr/local/haraka/config/host_list
# Configure plugins
ADD ./plugins/package.json /usr/local/haraka/package.json
ADD ./plugins/smtpin.js /usr/local/haraka/plugins/smtpin.js
# CHECK: required?
ADD ./config/smtp.ini /usr/local/haraka/config/
ADD ./config/plugins /usr/local/haraka/config/plugins
RUN cd /usr/local/haraka && npm install
# Create haraka runit service
RUN mkdir /etc/service/haraka
ADD haraka.sh /etc/service/haraka/run
EXPOSE 25
# TODO: key + dual port
# EXPOSE 587
# Start the init daemon - runit will launch the Haraka process
CMD ["/sbin/my_init"]
Step 13/23 : RUN haraka -i /usr/local/haraka ---> Running in 3b7a800ae955
/usr/lib/node_modules/Haraka/bin/haraka:93 let plist = dir + "\n"; ^^^^^ SyntaxError: Unexpected identifier at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:945:3 The command '/bin/sh -c haraka -i /usr/local/haraka' returned a non-zero code: 8 Makefile:41: recipe for target 'build' failed make: *** [build] Error 8