-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94b13a5
commit 7868182
Showing
5 changed files
with
52 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
package-lock.json | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
FROM node:18-alpine | ||
# syntax=docker/dockerfile:1.4 | ||
|
||
WORKDIR '/app' | ||
ARG NODE_VERSION=18.10.0 | ||
|
||
COPY ./package.json ./ | ||
# Create image based on the official Node image from dockerhub | ||
FROM node:${NODE_VERSION}-alpine | ||
|
||
# Create app directory | ||
WORKDIR /app | ||
|
||
# Copy dependency definitions | ||
COPY ./package.json /app | ||
COPY ./package-lock.json /app | ||
|
||
# Install dependecies | ||
RUN npm install | ||
COPY ./ ./ | ||
|
||
# Get all the code needed to run the app | ||
COPY ./ /app | ||
|
||
# Expose the port the app runs in | ||
EXPOSE 3000 | ||
|
||
# Serve the app | ||
CMD ["npm", "run", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
package-lock.json | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
FROM node:18-alpine | ||
# syntax=docker/dockerfile:1.4 | ||
|
||
WORKDIR '/app' | ||
ARG NODE_VERSION=18.10.0 | ||
|
||
COPY ./package.json ./ | ||
# Create image based on the official Node image from dockerhub | ||
FROM node:${NODE_VERSION}-alpine | ||
|
||
# Create app directory | ||
WORKDIR /app | ||
|
||
# Copy dependency definitions | ||
COPY ./package.json /app | ||
COPY ./package-lock.json /app | ||
|
||
# Install dependecies | ||
RUN npm install | ||
COPY ./ ./ | ||
|
||
# Get all the code needed to run the app | ||
COPY ./ /app | ||
|
||
CMD ["npm", "run", "dev"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
FROM node:18-alpine | ||
# syntax=docker/dockerfile:1.4 | ||
|
||
WORKDIR '/app' | ||
ARG NODE_VERSION=18.10.0 | ||
|
||
COPY ./package.json ./ | ||
# Create image based on the official Node image from dockerhub | ||
FROM node:${NODE_VERSION}-alpine | ||
|
||
# Create app directory | ||
WORKDIR /app | ||
|
||
# Copy dependency definitions | ||
COPY ./package.json /app | ||
COPY ./package-lock.json /app | ||
|
||
# Install dependecies | ||
RUN npm install | ||
COPY ./ ./ | ||
|
||
# Get all the code needed to run the app | ||
COPY ./ /app | ||
|
||
CMD ["npm", "run", "dev"] |