Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit adb6cb1

Browse files
committedJun 21, 2024
feat: change new architecture
1 parent 640e452 commit adb6cb1

File tree

10 files changed

+54
-14
lines changed

10 files changed

+54
-14
lines changed
 

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ echo $CR_PAT | docker login ghcr.io -u [USERNAME] --password-stdin
1818
# --platform linux/amd64 ... for Github Actions and Linux
1919
# --platform linux/arm ... for Mac
2020
docker buildx build --platform linux/amd64 --no-cache -f [Dockerfile] -t ghcr.io/[USERNAME]/[name:imageTag] .
21-
# ex. docker buildx build --platform linux/amd64 --no-cache -f [Dockerfile] -t ghcr.io/aecomet/[name:imageTag] .
21+
# ex. docker buildx build --platform linux/amd64 --no-cache -f Dockerfile -t ghcr.io/aecomet/[name:imageTag] .
2222
```
2323

2424
## push image

‎commitlint/.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
1+
.dockerignore
2+
Dockerfile

‎commitlint/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:22.2.0-slim as builder
2+
3+
WORKDIR /app
4+
COPY . /app
5+
RUN apt update &&\
6+
# install git and make `.git` to use reviewdog
7+
apt install -y git &&\
8+
yarn global add pnpm@9.2.0 &&\
9+
pnpm install --frozen-lockfile
10+
11+
ENTRYPOINT [ "/bin/sh" ]
12+
CMD [ "-c", "sh" ]

‎commitlint/node-22.2.0-with-ci.Dockerfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
version: '3'
21
services:
32
debug:
43
build:
5-
context: .
6-
dockerfile: ./pnpm/node-22.2.0-with-pnpm.Dockerfile
4+
# your path to Dockerfile
5+
context: ./commitlint
6+
dockerfile: Dockerfile

‎pnpm/.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.dockerignore
2+
Dockerfile
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
FROM node:22.2.0-slim as builder
22

33
RUN yarn global add pnpm@9.2.0
4+
5+
ENTRYPOINT [ "/bin/sh" ]
6+
CMD [ "-c", "sh" ]

‎publish-image.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
usage() {
4+
echo "Usage: $0 [tag]"
5+
exit 1
6+
}
7+
8+
if [ $# -eq 0 ]; then
9+
echo "Error: No args specified."
10+
usage
11+
fi
12+
13+
tag=$1
14+
names=("commitlint" "pnpm" "reviewdog")
15+
16+
# build image
17+
for name in ${names[@]}; do
18+
docker buildx build --platform linux/amd64 --no-cache -f "./$name/Dockerfile" -t "ghcr.io/aecomet/$name-base:$tag" ./$name
19+
done
20+
21+
# publish images
22+
for name in ${names[@]}; do
23+
docker push "ghcr.io/aecomet/$name-base:$tag"
24+
done

‎reviewdog/.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
1+
.dockerignore
2+
Dockerfile

‎reviewdog/node-22.2.0-with-pnpm.Dockerfile renamed to ‎reviewdog/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ FROM node:22.2.0-slim as builder
33
WORKDIR /app
44
COPY . /app
55
RUN apt update &&\
6-
# install curl and make `.git` to use reviewdog
7-
apt install -y curl &&\
6+
# install curl, git and make `.git` to use reviewdog
7+
apt install -y curl git &&\
88
mkdir -p .git &&\
99
# install pnpm
1010
yarn global add pnpm@9.2.0
11+
12+
ENTRYPOINT [ "/bin/sh" ]
13+
CMD [ "-c", "sh" ]

0 commit comments

Comments
 (0)
Please sign in to comment.