Skip to content

Instantly share code, notes, and snippets.

@GulajavaMinistudio
Forked from RinatMullayanov/Dockerfile
Created November 27, 2019 15:43
Show Gist options
  • Select an option

  • Save GulajavaMinistudio/ceb4dfafa0d8da62291481bbb2799034 to your computer and use it in GitHub Desktop.

Select an option

Save GulajavaMinistudio/ceb4dfafa0d8da62291481bbb2799034 to your computer and use it in GitHub Desktop.

Revisions

  1. @RinatMullayanov RinatMullayanov revised this gist Oct 25, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Dockerfile
    Original file line number Diff line number Diff line change
    @@ -24,5 +24,6 @@ RUN cd /src; npm install
    # Binds to port 8080
    EXPOSE 8080

    # Defines your runtime(define default command.)
    # 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"]
  2. @RinatMullayanov RinatMullayanov created this gist Oct 25, 2015.
    28 changes: 28 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    #
    # Ubuntu Node.js Dockerfile
    #
    # https://github.com/dockerfile/ubuntu/blob/master/Dockerfile
    # https://docs.docker.com/examples/nodejs_web_app/
    #

    # Pull base image.
    FROM ubuntu:14.04

    # Install Node.js
    RUN apt-get install --yes curl
    RUN curl --silent --location https://deb.nodesource.com/setup_4.x | sudo bash -
    RUN apt-get install --yes nodejs
    RUN apt-get install --yes build-essential

    # Bundle app source
    # Trouble with COPY http://stackoverflow.com/a/30405787/2926832
    COPY . /src

    # Install app dependencies
    RUN cd /src; npm install

    # Binds to port 8080
    EXPOSE 8080

    # Defines your runtime(define default command.)
    CMD ["node", "/src/index.js"]