fix(docker): remove hardcoded arch
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
parent
663c7eb3a1
commit
ddeea33e70
2 changed files with 4 additions and 6 deletions
|
|
@ -1,7 +1,4 @@
|
||||||
#ARCH can be amd64 or arm64
|
FROM node:20-alpine
|
||||||
ARG ARCH=amd64
|
|
||||||
|
|
||||||
FROM --platform=linux/$ARCH node:20-alpine
|
|
||||||
LABEL Maintainer="KRAIEM Taha Yassine<tahayk2@gmail.com>"
|
LABEL Maintainer="KRAIEM Taha Yassine<tahayk2@gmail.com>"
|
||||||
RUN apk add --no-cache tini
|
RUN apk add --no-cache tini
|
||||||
|
|
||||||
|
|
@ -22,4 +19,4 @@ USER 1001
|
||||||
ADD --chown=1001 https://static.openreplay.com/geoip/GeoLite2-City.mmdb $MAXMINDDB_FILE
|
ADD --chown=1001 https://static.openreplay.com/geoip/GeoLite2-City.mmdb $MAXMINDDB_FILE
|
||||||
|
|
||||||
ENTRYPOINT ["/sbin/tini", "--"]
|
ENTRYPOINT ["/sbin/tini", "--"]
|
||||||
CMD npm start
|
CMD npm start
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
# Usage: IMAGE_TAG=latest DOCKER_REPO=myDockerHubID bash build.sh <ee>
|
# Usage: IMAGE_TAG=latest DOCKER_REPO=myDockerHubID bash build.sh <ee>
|
||||||
|
|
||||||
|
ARCH=${ARCH:-amd64}
|
||||||
git_sha=$(git rev-parse --short HEAD)
|
git_sha=$(git rev-parse --short HEAD)
|
||||||
image_tag=${IMAGE_TAG:-git_sha}
|
image_tag=${IMAGE_TAG:-git_sha}
|
||||||
check_prereq() {
|
check_prereq() {
|
||||||
|
|
@ -51,7 +52,7 @@ function build_api() {
|
||||||
[[ $1 == "ee" ]] && {
|
[[ $1 == "ee" ]] && {
|
||||||
cp -rf ../ee/assist/* ./
|
cp -rf ../ee/assist/* ./
|
||||||
}
|
}
|
||||||
docker build -f ./Dockerfile --platform linux/${ARCH:-"amd64"} --build-arg GIT_SHA=$git_sha -t ${DOCKER_REPO:-'local'}/assist:${image_tag} .
|
docker build -f ./Dockerfile --platform linux/"${ARCH:-'amd64'}" --build-arg GIT_SHA=$git_sha -t ${DOCKER_REPO:-'local'}/assist:${image_tag} .
|
||||||
|
|
||||||
cd ../assist
|
cd ../assist
|
||||||
rm -rf ../${destination}
|
rm -rf ../${destination}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue