mirror of
https://github.com/hiteshchoudhary/apihub.git
synced 2025-12-05 18:46:17 -06:00
21 lines
454 B
Docker
21 lines
454 B
Docker
FROM node:20.13.1-alpine
|
|
|
|
RUN mkdir -p /usr/src/freeapi && chown -R node:node /usr/src/freeapi
|
|
|
|
WORKDIR /usr/src/freeapi
|
|
|
|
# Copy package json and yarn lock only to optimise the image building
|
|
COPY package.json yarn.lock ./
|
|
|
|
# copy prepare.js prior. It will be executed after package installation and before ROOT dir is cloned
|
|
COPY prepare.js ./
|
|
|
|
USER node
|
|
|
|
RUN yarn install --pure-lockfile
|
|
|
|
COPY --chown=node:node . .
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD [ "npm", "start" ] |