docker
This commit is contained in:
parent
72f625e62a
commit
d73e9bec5d
18
backend-docker/Dockerfile
Normal file
18
backend-docker/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
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"]
|
3
backend-docker/entrypoint.sh
Executable file
3
backend-docker/entrypoint.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
"$@"
|
Loading…
Reference in New Issue
Block a user