19 lines
342 B
Docker
19 lines
342 B
Docker
FROM node:20-alpine
|
|
|
|
# Workdir
|
|
RUN mkdir /usr/local/app
|
|
RUN chown 33:33 /usr/local/app
|
|
WORKDIR /usr/local/app
|
|
|
|
ADD entrypoint.sh /usr/local/bin
|
|
|
|
# Install modules
|
|
RUN npm install -g json-server
|
|
|
|
USER 33
|
|
|
|
# Cant kill with ctrl+c
|
|
#ENTRYPOINT ["/usr/local/bin/json-server", "db.json"]
|
|
ENTRYPOINT ["entrypoint.sh"]
|
|
CMD ["json-server", "db.json"]
|