mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-24 13:10:51 +00:00
Have separate build arguments for ARCH
and GOARCH
This commit is contained in:
parent
c39576b559
commit
a57d078b04
3
.github/workflows/publish.yml
vendored
3
.github/workflows/publish.yml
vendored
@ -70,7 +70,8 @@ jobs:
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
ARCH=amd64
|
||||
ARCH=amd64v8
|
||||
GOARCH=amd64
|
||||
SEM_VER=${{ steps.versioning.outputs.version }}
|
||||
BUILD_TIMESTAMP=${{ steps.version_parameters.outputs.build_timestamp }}
|
||||
GIT_BRANCH=${{ steps.version_parameters.outputs.branch }}
|
||||
|
@ -1,4 +1,5 @@
|
||||
ARG ARCH=
|
||||
ARG GOARCH=
|
||||
FROM ${ARCH}/node:14 AS site-build
|
||||
|
||||
WORKDIR /app/ui-build
|
||||
@ -12,7 +13,7 @@ RUN npm run build
|
||||
|
||||
FROM ${ARCH}/golang:1.17-alpine AS builder
|
||||
# Set necessary environment variables needed for our image.
|
||||
ENV CGO_ENABLED=1 GOOS=linux GOARCH=${ARCH}
|
||||
ENV CGO_ENABLED=1 GOOS=linux GOARCH=${GOARCH}
|
||||
|
||||
RUN apk add binutils-gold libpcap-dev gcc g++ make bash perl-utils
|
||||
|
||||
|
@ -10,7 +10,7 @@ Basic APIs:
|
||||
1. Run `go get github.com/go-delve/delve/cmd/dlv`
|
||||
2. Create a "Go Remote" run/debug configuration in Intellij, set to localhost:2345
|
||||
3. Build and push a debug image using
|
||||
`docker build . -t gcr.io/up9-docker-hub/mizu/debug:latest --build-arg ARCH=amd64 -f debug.Dockerfile && docker push gcr.io/up9-docker-hub/mizu/debug:latest`
|
||||
`docker build . -t gcr.io/up9-docker-hub/mizu/debug:latest --build-arg ARCH=amd64 --build-arg GOARCH=amd64 -f debug.Dockerfile && docker push gcr.io/up9-docker-hub/mizu/debug:latest`
|
||||
|
||||
### Connecting
|
||||
1. Start mizu using the cli with the debug
|
||||
|
@ -9,6 +9,7 @@ GIT_BRANCH=$(git branch | grep \* | cut -d ' ' -f2 | tr '[:upper:]' '[:lower:]')
|
||||
DOCKER_REPO=$REPOSITORY/$SERVER_NAME/$GIT_BRANCH
|
||||
SEM_VER=${SEM_VER=0.0.0}
|
||||
ARCH=amd64
|
||||
GOARCH=amd64
|
||||
|
||||
DOCKER_TAGGED_BUILDS=("$DOCKER_REPO:latest" "$DOCKER_REPO:$SEM_VER")
|
||||
|
||||
@ -20,7 +21,7 @@ fi
|
||||
|
||||
echo "building ${DOCKER_TAGGED_BUILDS[@]}"
|
||||
DOCKER_TAGS_ARGS=$(echo ${DOCKER_TAGGED_BUILDS[@]/#/-t }) # "-t FIRST_TAG -t SECOND_TAG ..."
|
||||
docker build $DOCKER_TAGS_ARGS --build-arg ARCH=${ARCH} --build-arg SEM_VER=${SEM_VER} --build-arg BUILD_TIMESTAMP=${BUILD_TIMESTAMP} --build-arg GIT_BRANCH=${GIT_BRANCH} --build-arg COMMIT_HASH=${COMMIT_HASH} .
|
||||
docker build $DOCKER_TAGS_ARGS --build-arg ARCH=${ARCH} --build-arg GOARCH=${GOARCH} --build-arg SEM_VER=${SEM_VER} --build-arg BUILD_TIMESTAMP=${BUILD_TIMESTAMP} --build-arg GIT_BRANCH=${GIT_BRANCH} --build-arg COMMIT_HASH=${COMMIT_HASH} .
|
||||
|
||||
for DOCKER_TAG in "${DOCKER_TAGGED_BUILDS[@]}"
|
||||
do
|
||||
|
@ -9,8 +9,9 @@ GIT_BRANCH=ci
|
||||
DOCKER_REPO=$REPOSITORY/$SERVER_NAME/$GIT_BRANCH
|
||||
SEM_VER=${SEM_VER=0.0.0}
|
||||
ARCH=amd64
|
||||
GOARCH=amd64
|
||||
|
||||
DOCKER_TAGGED_BUILD="$DOCKER_REPO:$SEM_VER"
|
||||
|
||||
echo "building $DOCKER_TAGGED_BUILD"
|
||||
docker build -t ${DOCKER_TAGGED_BUILD} --build-arg ARCH=${ARCH} --build-arg SEM_VER=${SEM_VER} --build-arg BUILD_TIMESTAMP=${BUILD_TIMESTAMP} --build-arg GIT_BRANCH=${GIT_BRANCH} --build-arg COMMIT_HASH=${COMMIT_HASH} .
|
||||
docker build -t ${DOCKER_TAGGED_BUILD} --build-arg ARCH=${ARCH} --build-arg GOARCH=${GOARCH} --build-arg SEM_VER=${SEM_VER} --build-arg BUILD_TIMESTAMP=${BUILD_TIMESTAMP} --build-arg GIT_BRANCH=${GIT_BRANCH} --build-arg COMMIT_HASH=${COMMIT_HASH} .
|
||||
|
@ -9,6 +9,7 @@ GIT_BRANCH=$(git branch | grep \* | cut -d ' ' -f2 | tr '[:upper:]' '[:lower:]')
|
||||
DOCKER_REPO=$REPOSITORY/$SERVER_NAME/$GIT_BRANCH
|
||||
SEM_VER=${SEM_VER=0.0.0}
|
||||
ARCH=amd64
|
||||
GOARCH=amd64
|
||||
|
||||
DOCKER_TAGGED_BUILDS=("$DOCKER_REPO:latest" "$DOCKER_REPO:$SEM_VER")
|
||||
|
||||
@ -20,7 +21,7 @@ fi
|
||||
|
||||
echo "building ${DOCKER_TAGGED_BUILDS[@]}"
|
||||
DOCKER_TAGS_ARGS=$(echo ${DOCKER_TAGGED_BUILDS[@]/#/-t }) # "-t FIRST_TAG -t SECOND_TAG ..."
|
||||
docker build $DOCKER_TAGS_ARGS --build-arg SEM_VER=${SEM_VER} --build-arg ARCH=${ARCH} --build-arg BUILD_TIMESTAMP=${BUILD_TIMESTAMP} --build-arg GIT_BRANCH=${GIT_BRANCH} --build-arg COMMIT_HASH=${COMMIT_HASH} .
|
||||
docker build $DOCKER_TAGS_ARGS --build-arg SEM_VER=${SEM_VER} --build-arg ARCH=${ARCH} --build-arg GOARCH=${GOARCH} --build-arg BUILD_TIMESTAMP=${BUILD_TIMESTAMP} --build-arg GIT_BRANCH=${GIT_BRANCH} --build-arg COMMIT_HASH=${COMMIT_HASH} .
|
||||
|
||||
for DOCKER_TAG in "${DOCKER_TAGGED_BUILDS[@]}"
|
||||
do
|
||||
|
Loading…
Reference in New Issue
Block a user