-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added arm64 build #5420
feat: added arm64 build #5420
Changes from 6 commits
0be4a42
a57ec54
ac7ee6d
a615517
01f2473
7dd0501
beb90e7
1fb5523
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, binaries built for linux/amd64 on CI are added to the image, but I have changed to build them inside the Dockerfile. This will automatically configure GOARCH and other settings. As noted in the Issue, the linux/arm64 docker image exists, but the binary that exits in the image is linux/amd64, which is the cause of the current error. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
FROM golang:1.23.3 AS builder | ||
|
||
WORKDIR /app | ||
|
||
COPY go.* ./ | ||
RUN go mod download | ||
|
||
COPY . ./ | ||
|
||
RUN make build/go MOD=helloworld | ||
|
||
FROM alpine:3.21.0 | ||
|
||
ADD .artifacts/helloworld /usr/local/bin/helloworld | ||
COPY --from=builder /app/.artifacts/helloworld /usr/local/bin/helloworld | ||
|
||
ENTRYPOINT ["helloworld"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base/301720292?tag=v0.49.3 | ||
FROM ghcr.io/pipe-cd/piped-base@sha256:e5ce81bfd81b6d8d24b2caf9ec482c3f6d11fff7ab96f6cc6fc854e82376fb3d | ||
FROM golang:1.23.3 AS builder | ||
|
||
ADD .artifacts/launcher /usr/local/bin/launcher | ||
WORKDIR /app | ||
|
||
COPY go.* ./ | ||
RUN go mod download | ||
|
||
COPY . ./ | ||
|
||
RUN make build/go MOD=launcher | ||
|
||
# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base/321463679?tag=v0.50.0-26-ga8527d2 | ||
FROM ghcr.io/pipe-cd/piped-base@sha256:9960b45a5aa822ae45ca2966056d8d2e98795b51681df25afd1fecf96360981c | ||
|
||
COPY --from=builder /app/.artifacts/launcher /usr/local/bin/launcher | ||
|
||
ENTRYPOINT ["launcher"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base-okd/237191933?tag=v0.47.3-rc0-21-ge20cd0b | ||
FROM ghcr.io/pipe-cd/piped-base-okd@sha256:afb1bfee70d445986d04c2066d2887da7b1e2e454cecabec5bf37e3201cd7e7e | ||
FROM golang:1.23.3 AS builder | ||
|
||
ADD .artifacts/launcher /usr/local/bin/launcher | ||
WORKDIR /app | ||
|
||
COPY go.* ./ | ||
RUN go mod download | ||
|
||
COPY . ./ | ||
|
||
RUN make build/go MOD=launcher | ||
|
||
# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base-okd/321464518?tag=v0.50.0-26-ga8527d2 | ||
FROM ghcr.io/pipe-cd/piped-base-okd@sha256:da9bd5a1dae3aa5c2df4baba81ff836ba4a55159d85984605549ef2d1f136895 | ||
|
||
COPY --from=builder /app/.artifacts/launcher /usr/local/bin/launcher | ||
|
||
ENTRYPOINT ["launcher"] |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,3 +1,26 @@ | ||||||
# web builder | ||||||
FROM node:20.18.1-alpine3.21 AS web | ||||||
|
||||||
WORKDIR /app | ||||||
|
||||||
COPY . . | ||||||
|
||||||
RUN apk add --no-cache make | ||||||
RUN make update/web-deps | ||||||
RUN make build/web | ||||||
|
||||||
# pipecd builder | ||||||
FROM golang:1.23.3 AS builder | ||||||
|
||||||
WORKDIR /app | ||||||
|
||||||
COPY go.* ./ | ||||||
RUN go mod download | ||||||
|
||||||
COPY . ./ | ||||||
|
||||||
RUN make build/go MOD=pipecd | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, we use Line 21 in d5ba3d2
Line 8 in d5ba3d2
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Warashi Thank you for your review. I installed And $ docker run --rm -it golang:1.23.3 git --help
usage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[--super-prefix=<path>] [--config-env=<name>=<envvar>]
<command> [<args>]
These are common Git commands used in various situations:
start a working area (see also: git help tutorial)
clone Clone a repository into a new directory
init Create an empty Git repository or reinitialize an existing one
work on the current change (see also: git help everyday)
add Add file contents to the index
mv Move or rename a file, a directory, or a symlink
restore Restore working tree files
rm Remove files from the working tree and from the index
examine the history and state (see also: git help revisions)
bisect Use binary search to find the commit that introduced a bug
diff Show changes between commits, commit and working tree, etc
grep Print lines matching a pattern
log Show commit logs
show Show various types of objects
status Show the working tree status
grow, mark and tweak your common history
branch List, create, or delete branches
commit Record changes to the repository
merge Join two or more development histories together
rebase Reapply commits on top of another base tip
reset Reset current HEAD to the specified state
switch Switch branches
tag Create, list, delete or verify a tag object signed with GPG
collaborate (see also: git help workflows)
fetch Download objects and refs from another repository
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects
'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
See 'git help git' for an overview of the system. |
||||||
FROM alpine:3.21.0 | ||||||
|
||||||
ARG GOOGLE_CLOUD_SDK_VERSION=477.0.0 | ||||||
|
@@ -15,7 +38,7 @@ ENV PATH="/google-cloud-sdk/bin:${PATH}" | |||||
|
||||||
RUN mkdir -p web/static | ||||||
|
||||||
ADD .artifacts/pipecd /usr/local/bin/pipecd | ||||||
ADD .artifacts/web-static web/static | ||||||
COPY --from=builder /app/.artifacts/pipecd /usr/local/bin/pipecd | ||||||
COPY --from=web /app/.artifacts/web-static web/static | ||||||
|
||||||
ENTRYPOINT ["pipecd"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
FROM golang:1.23.3 AS builder | ||
|
||
WORKDIR /app | ||
|
||
COPY go.* ./ | ||
RUN go mod download | ||
|
||
COPY . ./ | ||
|
||
RUN make build/go MOD=pipectl | ||
|
||
FROM alpine:3.21.0 | ||
|
||
RUN apk add --no-cache git | ||
|
||
ADD .artifacts/pipectl /usr/local/bin/pipectl | ||
COPY --from=builder /app/.artifacts/pipectl /usr/local/bin/pipectl | ||
|
||
ENTRYPOINT ["pipectl"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base/301720292?tag=v0.49.3 | ||
FROM ghcr.io/pipe-cd/piped-base@sha256:e5ce81bfd81b6d8d24b2caf9ec482c3f6d11fff7ab96f6cc6fc854e82376fb3d | ||
FROM golang:1.23.3 AS builder | ||
|
||
ADD .artifacts/piped /usr/local/bin/piped | ||
WORKDIR /app | ||
|
||
COPY go.* ./ | ||
RUN go mod download | ||
|
||
COPY . ./ | ||
|
||
RUN make build/go MOD=piped | ||
|
||
# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base/321463679?tag=v0.50.0-26-ga8527d2 | ||
FROM ghcr.io/pipe-cd/piped-base@sha256:9960b45a5aa822ae45ca2966056d8d2e98795b51681df25afd1fecf96360981c | ||
|
||
COPY --from=builder /app/.artifacts/piped /usr/local/bin/piped | ||
|
||
ENTRYPOINT ["piped"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base-okd/237191933?tag=v0.47.3-rc0-21-ge20cd0b | ||
FROM ghcr.io/pipe-cd/piped-base-okd@sha256:afb1bfee70d445986d04c2066d2887da7b1e2e454cecabec5bf37e3201cd7e7e | ||
FROM golang:1.23.3 AS builder | ||
|
||
ADD .artifacts/piped /usr/local/bin/piped | ||
WORKDIR /app | ||
|
||
COPY go.* ./ | ||
RUN go mod download | ||
|
||
COPY . ./ | ||
|
||
RUN make build/go MOD=piped | ||
|
||
# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base-okd/321464518?tag=v0.50.0-26-ga8527d2 | ||
FROM ghcr.io/pipe-cd/piped-base-okd@sha256:da9bd5a1dae3aa5c2df4baba81ff836ba4a55159d85984605549ef2d1f136895 | ||
|
||
COPY --from=builder /app/.artifacts/piped /usr/local/bin/piped | ||
|
||
ENTRYPOINT ["piped"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ASK] Is this line still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ponkio-o
Sorry for the wrong selection.
I'm asking about only this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, the below line is needed.
Fixed in the following commit.
1fb5523