diff --git a/Dockerfile b/Dockerfile index db249f6..f35fd13 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ COPY --from=deps /app/node_modules ./node_modules RUN yarn build && yarn install # Production image, copy all the files and run next -FROM node:16.13.1 AS runner +FROM node:alpine AS runner WORKDIR /app ENV NODE_ENV production diff --git a/build_number b/build_number new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/build_number @@ -0,0 +1 @@ +2 diff --git a/docker.sh b/docker.sh new file mode 100755 index 0000000..e11da6a --- /dev/null +++ b/docker.sh @@ -0,0 +1,10 @@ +#!/bin/sh +m=$(cat ./build_number) +echo $m +wait 10 +docker build -t ghcr.io/lucxjo/friends-best:build-$m . +docker build -t ghcr.io/lucxjo/friends-best:latest . +docker push ghcr.io/lucxjo/friends-best:build-$m +docker push ghcr.io/lucxjo/friends-best:latest + +echo $((m+1)) > ./build_number \ No newline at end of file