diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a31a5a3 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +node_modules/ +LICENSE +.vscode/ +.idea/ +yarn.lock +package-lock.json diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..41cb0d7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM node:carbon + +LABEL maintainer="KINGDOM ISAAC" +LABEL version="1.0" + +ENV HOME=/app +WORKDIR $HOME + +COPY package.json . +RUN npm install +COPY . . + +EXPOSE 8080 + +CMD [ "./start.sh" ] diff --git a/README.md b/README.md index 158ef72..eddb6b0 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,17 @@ npm run report-coverage * 0.0.1 * Work in progress +### Docker + +Build the image with the command +```sh +docker build . -t react-webpack-start +``` +This builds the image with the tag `react-webpack-start`. Once this is completed, you can instantiate the container with the image with the command +```sh +docker run -p 8080:8080 -v rws:/app react-webpack-start:latest +``` + ## Meta Orjiewuru Kingdom – [@kingisaac95](https://twitter.com/kingisaac95) – kingdom.orjiewuru@gmail.com diff --git a/src/app/App.js b/src/app/App.js index 3b5d5e7..d0f701f 100644 --- a/src/app/App.js +++ b/src/app/App.js @@ -1,12 +1,12 @@ -import React from 'react'; +import React, { Fragment } from 'react'; import Header from './components/Header'; import Content from './views/Content'; const App = () => ( -