Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker build #485

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM node:9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not node:8 (LTS) or node:10 (latest stable)?

Copy link
Member

@rstacruz rstacruz Jun 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, how do you build this? some instructions would be great :)


RUN apt-get update -qqy \
&& apt-get -qqy install \
sudo \
telnet \
bc \
vim \
git \
wget \
bzip2 \
curl \
unzip \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir /app
WORKDIR /app

ADD ./*.json /app/
ADD ./*.js /app/
RUN npm install

CMD ["npm", "run", "make"]

14 changes: 14 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
CONTAINER_NAME="react-pagejs"
IMAGE_NAME="mishadev/react-pagejs"
DOCKERFILE="Dockerfile"

docker rm -f $CONTAINER_NAME
docker rmi -f $IMAGE_NAME
echo =============================================================
echo build image $IMAGE_NAME form file ./$DOCKERFILE
echo =============================================================
docker build -t $IMAGE_NAME --file="${DOCKERFILE}" .

Loading