I would like to have a docker container for a CI-step that has docker and node installed. I thought it would be the perfect use-case to use the multistage build.
I have a new docker version Docker version 18.09.3, build 774a1f4
and I tried this Dockerfile, but to no avail:
FROM docker:18.09.3
FROM node:8
CMD ['bash']
The resulting image has node-stuff such as npm installed, but no docker things... Any ideas how to proceed here?
Thanks a lot!
Update
I changed the Dockerfile to this, which also does not work (docker is not installed in the container):
FROM docker:18.09.3
FROM ubuntu:latest
USER root
RUN apt-get update
RUN apt-get -y install curl gnupg
RUN curl -sL https://deb.nodesource.com/setup_11.x | bash -
RUN apt-get -y install nodejs
CMD [ "node" ]
Update2 This Dockerfile does what I need, but it is not with multi-stage (which I would have liked to try here)
FROM docker:18.09.3
USER root
RUN apk update
RUN apk add --update nodejs nodejs-npm
CMD [ "node" ]