I am trying to build a custom Docker image using a Dockerfile. The base image I am using is this one:
My Dockerfile is like this:
FROM l3iggs/archlinux:latest
COPY source /srv/visitor
WORKDIR /srv/visitor
RUN pacman -Syyu --needed --noconfirm &&
pacman -S --needed --noconfirm cronie nodejs phantomjs &&
printf "1.2.3.4 www.hahaha.org \n" >> /etc/hosts &&
printf "*/2 * * * * node /srv/visitor/visitor.js \n" >> cronJobs &&
printf "*/5 * * * * killall -older-than 5m phantomjs \n" >> cronJobs &&
printf "0 0 * * * rm /srv/visitor/visitor-info.log \n" >> cronJobs &&
crontab cronJobs &&
rm cronJobs &&
npm install
EXPOSE 80
CMD ["/bin/sh", "-c"]
Now, when it gets to the "RUN" part, where it is supposed to update, it hangs and outputs this error message:
Step 3 : RUN pacman -Syyu --needed --noconfirm &&
---> Running in ae19ff7ca233
/bin/sh: -c: line 1: syntax error: unexpected end of file
INFO[0013] The command [/bin/sh -c pacman -Syyu --needed --noconfirm &&] returned a non-zero code: 1
Any ideas?
UPDATE 1:
Now, I suspect my issue has more to do with the "RUN" command, than with the "pacman -Syyu" being executed inside the container. This should really not be braking things, but it clearly is.