mirror of
https://github.com/yuzu-emu/Command-fix.git
synced 2024-11-25 20:55:46 +01:00
c067184ce3
* Dockerfile: use `AS` directive to avoid ambiguity * README: replace h1 with h2 to avoid CommonMark parser to fail * deps: updated JS dependencies
29 lines
660 B
Docker
29 lines
660 B
Docker
FROM mhart/alpine-node:latest AS build
|
|
|
|
# Create app directory
|
|
WORKDIR /usr/src/app
|
|
|
|
# Install app dependencies and add source files
|
|
COPY package.json yarn.lock tsconfig.json ./
|
|
COPY src/ ./src
|
|
RUN yarn install && yarn build && rm -f dist/*.map
|
|
|
|
# Second stage
|
|
FROM mhart/alpine-node:latest
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# Copy artifacts
|
|
COPY --from=build /usr/src/app/dist/ ./
|
|
COPY --from=build /usr/src/app/node_modules ./node_modules
|
|
COPY env.json src/responses.json ./
|
|
COPY src/responses ./responses/
|
|
|
|
RUN addgroup -S app -g 50000 && \
|
|
adduser -S -g app -u 50000 app && \
|
|
mkdir /data && chown app:app /data/
|
|
|
|
USER app
|
|
|
|
ENTRYPOINT [ "node", "server.js" ]
|