Skip to content

Commit

Permalink
Merge pull request #51 from Jont828/go-v1.21
Browse files Browse the repository at this point in the history
Bump go to v1.21 and API to Dockerfile
  • Loading branch information
Jont828 authored Apr 1, 2024
2 parents 33f553c + 03bac72 commit ab54c3f
Show file tree
Hide file tree
Showing 4 changed files with 5,870 additions and 5,450 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@
ARG ARCH

# Build the web app.
FROM node:16 as web-builder
FROM node:20 as web-builder

WORKDIR /app
COPY ./web /app
RUN npm install

RUN npm config set registry http://registry.npmjs.org/
RUN npm install --verbose
RUN npm run build


# Build the Go binary.
# Alpine is chosen for its small footprint
# compared to Ubuntu
FROM golang:1.20-alpine as builder
FROM golang:1.21-alpine as builder

# Need to redeclare ARCH to use in Go build stage
ARG ARCH
Expand All @@ -34,6 +36,7 @@ go mod download
COPY ./main.go /app/
COPY ./internal /app/internal
COPY ./version /app/version
COPY ./api /app/api

RUN CGO_ENABLED=0 GOARCH=${ARCH} go build -trimpath -ldflags "${ldflags} -extldflags '-static'" -o main

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Jont828/cluster-api-visualizer

go 1.20
go 1.21

require (
github.com/gobuffalo/flect v1.0.2
Expand Down
Loading

0 comments on commit ab54c3f

Please sign in to comment.