Skip to content

Commit

Permalink
fix gcsfuse build command
Browse files Browse the repository at this point in the history
  • Loading branch information
songjiaxun committed Sep 19, 2023
1 parent e0efe82 commit 9a97237
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,35 +60,35 @@ download-gcsfuse:
mkdir -p ${BINDIR}/linux/amd64 ${BINDIR}/linux/arm64

ifeq (${BUILD_GCSFUSE_FROM_SOURCE}, true)
rm -rf ${BINDIR}/gcsfuse
git clone -b master https://github.com/GoogleCloudPlatform/gcsfuse.git ${BINDIR}/gcsfuse -q
$(eval GCSFUSE_VERSION=999.$(shell git -C ${BINDIR}/gcsfuse rev-parse HEAD))
rm -f ${BINDIR}/Dockerfile.gcsfuse
curl https://raw.githubusercontent.com/GoogleCloudPlatform/gcsfuse/master/tools/package_gcsfuse_docker/Dockerfile -o ${BINDIR}/Dockerfile.gcsfuse
$(eval GCSFUSE_VERSION=999.$(shell git ls-remote https://github.com/GoogleCloudPlatform/gcsfuse.git HEAD | cut -c 1-40))

docker buildx build \
--load \
--file ${BINDIR}/gcsfuse/tools/package_gcsfuse_docker/Dockerfile \
--file ${BINDIR}/Dockerfile.gcsfuse \
--tag gcsfuse-release:${GCSFUSE_VERSION}-amd \
--build-arg GCSFUSE_VERSION=${GCSFUSE_VERSION} \
--build-arg BRANCH_NAME=master \
--build-arg ARCHITECTURE=amd64 \
--platform=linux/amd64 .

docker run -it \
docker run \
--platform=linux/amd64 \
-v ${BINDIR}/linux/amd64:/release \
gcsfuse-release:${GCSFUSE_VERSION}-amd \
cp /gcsfuse_${GCSFUSE_VERSION}_amd64/usr/bin/gcsfuse /release

docker buildx build \
--load \
--file ${BINDIR}/gcsfuse/tools/package_gcsfuse_docker/Dockerfile \
--file ${BINDIR}/Dockerfile.gcsfuse \
--tag gcsfuse-release:${GCSFUSE_VERSION}-arm \
--build-arg GCSFUSE_VERSION=${GCSFUSE_VERSION} \
--build-arg BRANCH_NAME=master \
--build-arg ARCHITECTURE=arm64 \
--platform=linux/arm64 .

docker run -it \
docker run \
--platform=linux/arm64 \
-v ${BINDIR}/linux/arm64:/release \
gcsfuse-release:${GCSFUSE_VERSION}-arm \
Expand Down

0 comments on commit 9a97237

Please sign in to comment.