Created
October 10, 2020 20:49
-
-
Save FlaviaBastos/6ecb85b7605031d49bde81130b51fb45 to your computer and use it in GitHub Desktop.
Sample Dockerfile for a image with Node.js installed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build with: docker build -f Dockerfile -t image_name . | |
# run with: docker run -it --name container_name image_name /bin/bash | |
# run exposing ports and sharing volume: | |
# docker run -it --name container_name -p 8000:8000 --mount type=bind,src=/your/path/to/local/source/code,dst=/src image_name /bin/bash | |
FROM debian | |
RUN apt-get update | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt update -y && apt install vim -y && apt install -y procps | |
RUN apt-get install -y curl | |
# Install Node.js PPA | |
RUN apt-get install -y software-properties-common | |
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - | |
# Install Node.js | |
RUN apt-get install -y nodejs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment