feat: dockerize

This commit is contained in:
Siwoo Jeon 2023-09-23 14:53:56 +09:00
parent 2b879489e9
commit 45be32b077
Signed by: migan
GPG key ID: C4151385FFD2082A
2 changed files with 9 additions and 1 deletions

View file

@ -1,4 +1,9 @@
FROM node:18.17.1 FROM node:18.17.1
ENV DOCKERIZE_VERSION v0.2.0
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
RUN mkdir app RUN mkdir app
WORKDIR /app WORKDIR /app
COPY . . COPY . .
@ -6,4 +11,4 @@ RUN yarn install
RUN yarn build RUN yarn build
ENTRYPOINT ["yarn", "start"] ENTRYPOINT ["./docker-entrypoint.sh"]

3
docker-entrypoint.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
dockerize -wait tcp://database:1502 -timeout 20s
yarn start