Skip to content

Commit

Permalink
revert changes to fix build extension image (#43)
Browse files Browse the repository at this point in the history
Signed-off-by: ashnamehrotra <[email protected]>
  • Loading branch information
ashnamehrotra authored Aug 2, 2024
1 parent 35f5459 commit efb26dc
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 53 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-alpine@sha256:0d3653dd6f35159ec6e3d10263a42372f6f194c3dea0b35235d72aabde86486e AS builder
FROM golang:1.21-alpine@sha256:3fadfe4dc99c79299b248a0a35a7b47a875524ee7aaa23adaa757473464cc590 AS builder
ENV CGO_ENABLED=0
WORKDIR /backend
COPY backend/go.* .
Expand All @@ -10,7 +10,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go build -trimpath -ldflags="-s -w" -o bin/service

FROM --platform=$BUILDPLATFORM node:22.2-alpine3.18@sha256:a46d9fcb38cae53de45b35b90f6df232342242bebc9323a417416eb67942979e AS client-builder
FROM --platform=$BUILDPLATFORM node:21.6-alpine3.18@sha256:911976032e5e174fdd8f5fb63d7089b09d59d21dba3df2728c716cbb88c7b821 AS client-builder
WORKDIR /ui
# cache packages in layer
COPY ui/package.json /ui/package.json
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ else
version := $(COPA_VERSION)
endif

build-extension: ## Build service image to be deployed as a desktop extension
docker build --tag=$(IMAGE):$(TAG) .
build-extension: prepare-buildx ## Build service image to be deployed as a desktop extension
docker buildx build --platform linux/amd64,linux/arm64 --tag=$(IMAGE):$(TAG) .

install-extension: build-extension ## Install the extension
docker extension install $(IMAGE):$(TAG)
Expand All @@ -30,7 +30,7 @@ prepare-buildx: ## Create buildx builder for multi-arch build, if not exists
push-extension: prepare-buildx ## Build & Upload extension image to hub. Do not push if tag already exists: make push-extension tag=0.1
docker pull $(IMAGE):$(TAG) && echo "Failure: Tag already exists" || docker buildx build --push --builder=$(BUILDER) --platform=linux/amd64,linux/arm64 --build-arg TAG=$(TAG) --tag=$(IMAGE):$(TAG) .

build-copa-image:
build-copa-image: prepare-buildx
docker buildx build --platform linux/amd64,linux/arm64 --build-arg copa_version=$(version) -t copa-extension container/copa-extension

help: ## Show this help
Expand Down
176 changes: 130 additions & 46 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@docker/extension-api-client": "0.3.4",
"@emotion/react": "11.13.0",
"@emotion/styled": "11.13.0",
"@mui/material": "5.16.6",
"@mui/material": "5.10.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand All @@ -20,7 +20,7 @@
"devDependencies": {
"@docker/extension-api-client-types": "0.3.4",
"@types/jest": "^29.1.2",
"@types/node": "^22.0.2",
"@types/node": "^18.7.18",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^2.1.0",
Expand Down

0 comments on commit efb26dc

Please sign in to comment.