Added Dockerfile and scripts to build and run a docker image for development
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
node_modules
|
||||||
|
npm-debug.log
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
FROM node:16.8
|
||||||
|
|
||||||
|
WORKDIR /usr/src/minecraft-website
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN npm run gulp sass
|
||||||
|
|
||||||
|
# expose node_modules as a volume so it stays within the container
|
||||||
|
VOLUME node_modules
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
CMD [ "npm", "run", "server" ]
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
docker build -t minecraft-website .
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
docker run -d --rm -p 3000:3000 --name minecraft-website minecraft-website
|
||||||
Reference in New Issue
Block a user