Skip to content

Instantly share code, notes, and snippets.

@ctwhome
Created April 11, 2021 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ctwhome/a6a9a06ca77beff377413cffc4ea1649 to your computer and use it in GitHub Desktop.
Save ctwhome/a6a9a06ca77beff377413cffc4ea1649 to your computer and use it in GitHub Desktop.
#
# Ubuntu Node.js Git Dockerfile
#
# https://github.com/dockerfile/ubuntu/blob/master/Dockerfile
# https://docs.docker.com/examples/nodejs_web_app/
#
# Pull base image.
FROM ubuntu
# Install Node.js
RUN apt update
RUN apt install -y git
RUN apt-get install --yes build-essential libssl-dev curl
# Installing Node
SHELL ["/bin/bash", "--login", "-i", "-c"]
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
RUN source /root/.bashrc && nvm install 12.14.1
SHELL ["/bin/bash", "--login", "-c"]
# Bundle app source
# Trouble with COPY http://stackoverflow.com/a/30405787/2926832
# COPY . /src
# Install app dependencies
# RUN cd /src; npm install
# Expose all po
# EXPOSE 8080
# EXPOSE 8000
# EXPOSE 3001
# EXPOSE 4000
# Defines your runtime(define default command)
# These commands unlike RUN (they are carried out in the construction of the container) are run when the container
# CMD ["node", "/src/index.js"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment