From d594b58bf640ea3386643934843416eb510751b4 Mon Sep 17 00:00:00 2001
From: manjularajamani <100277950+manjularajamani@users.noreply.github.com>
Date: Tue, 1 Nov 2022 18:41:18 +0530
Subject: [PATCH 1/4] Add Dockerfile and Updated README.md
---
.dockerignore | 3 +++
Dockerfile | 11 +++++++++++
README.md | 14 ++++++++++++++
3 files changed, 28 insertions(+)
create mode 100644 .dockerignore
create mode 100644 Dockerfile
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..2a53bce
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,3 @@
+LICENSE*
+README.md
+Dockerfile
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..93dbb16
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,11 @@
+From node:latest
+
+COPY . .
+
+WORKDIR /app
+
+RUN npm install
+
+Expose 8080
+
+CMD ["npm", "start"]
diff --git a/README.md b/README.md
index a498cc4..8ee43d7 100644
--- a/README.md
+++ b/README.md
@@ -42,3 +42,17 @@ in showing me how some of the wonky bits worked.
Also thanks to the Google dev relations guys for the file stuff here:
.
+## How to run this app using Docker
+
+**Clone the repository**
+
+```
+git clone https://github.com/manjularajamani/hypertext-editor.git
+
+cd hypertext-editor
+
+docker build -t .
+
+docker run -d -it --name
+
+```
\ No newline at end of file
From 7de9b3da1426effb63b935b7fc46ba23a199f14b Mon Sep 17 00:00:00 2001
From: Manjula Rajamani <100277950+manjularajamani@users.noreply.github.com>
Date: Tue, 1 Nov 2022 18:51:21 +0530
Subject: [PATCH 2/4] Update README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 8ee43d7..916ed7f 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@ Also thanks to the Google dev relations guys for the file stuff here:
**Clone the repository**
```
-git clone https://github.com/manjularajamani/hypertext-editor.git
+git clone https://github.com/russellbeattie/hypertext-editor.git
cd hypertext-editor
@@ -55,4 +55,4 @@ docker build -t .
docker run -d -it --name
-```
\ No newline at end of file
+```
From 56b138ada0c49d05673348cd5ed27db3da08389b Mon Sep 17 00:00:00 2001
From: manjularajamani <100277950+manjularajamani@users.noreply.github.com>
Date: Mon, 7 Nov 2022 14:07:38 +0530
Subject: [PATCH 3/4] feat: Updated Dockerfile and README.md
---
Dockerfile | 19 ++++++++++++++-----
README.md | 3 +--
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 93dbb16..12190af 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,11 +1,20 @@
-From node:latest
+FROM node:16.15.0-alpine
+
+WORKDIR /opt/app-root/src
COPY . .
-WORKDIR /app
+ENV USER_NAME=hyper \
+ USER_ID=1001 \
+ GROUP_ID=0
+
+RUN echo "${USER_NAME}:x:${USER_ID}:${GROUP_ID}:Hypertext Application User:/opt/app-root/:/bin/bash" >> /etc/passwd &\
+ chown -R 1001:0 "/opt/app-root"
+
+USER 1001
-RUN npm install
+RUN npm install
-Expose 8080
+EXPOSE 8080
-CMD ["npm", "start"]
+CMD ["npm", "start"]
\ No newline at end of file
diff --git a/README.md b/README.md
index 916ed7f..5ed2a72 100644
--- a/README.md
+++ b/README.md
@@ -44,7 +44,6 @@ Also thanks to the Google dev relations guys for the file stuff here:
## How to run this app using Docker
-**Clone the repository**
```
git clone https://github.com/russellbeattie/hypertext-editor.git
@@ -53,6 +52,6 @@ cd hypertext-editor
docker build -t .
-docker run -d -it --name
+docker run -d -it --name -p :
```
From f9af90ca3e7af6d715cb2b6003c9ead18c0646d5 Mon Sep 17 00:00:00 2001
From: manjularajamani <100277950+manjularajamani@users.noreply.github.com>
Date: Tue, 8 Nov 2022 12:14:26 +0530
Subject: [PATCH 4/4] docs: Updated README.md
---
README.md | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/README.md b/README.md
index 5ed2a72..1827547 100644
--- a/README.md
+++ b/README.md
@@ -42,6 +42,20 @@ in showing me how some of the wonky bits worked.
Also thanks to the Google dev relations guys for the file stuff here:
.
+
+## How to run this app
+
+```
+git clone https://github.com/russellbeattie/hypertext-editor.git
+
+cd hypertext-editor
+
+npm install
+
+npm start
+
+```
+
## How to run this app using Docker