-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it similar to `make release`. Signed-off-by: Martynas Pumputis <[email protected]>
- Loading branch information
Showing
1 changed file
with
6 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
FROM ubuntu:22.04 AS build | ||
FROM docker.io/library/golang:1.23.1 AS build | ||
|
||
ENV PATH $PATH:/usr/local/go/bin | ||
|
||
RUN apt update -y -q && \ | ||
DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y -q \ | ||
curl \ | ||
build-essential \ | ||
ca-certificates \ | ||
wget \ | ||
gnupg2 \ | ||
git \ | ||
llvm \ | ||
clang \ | ||
gcc flex bison gcc-aarch64* libc6-dev-arm64-cross && \ | ||
curl -s https://storage.googleapis.com/golang/go1.23.1.linux-amd64.tar.gz | tar -v -C /usr/local -xz | ||
RUN apt update && \ | ||
apt install -y make git clang-15 llvm curl gcc flex bison gcc-aarch64* libc6-dev-arm64-cross && \ | ||
ln -s /usr/bin/clang-15 /usr/bin/clang | ||
|
||
WORKDIR /pwru | ||
COPY . . | ||
RUN make && \ | ||
chmod a+x /pwru | ||
RUN make local-release | ||
RUN tar xfv release/pwru-linux-amd64.tar.gz | ||
|
||
FROM busybox | ||
COPY --from=build /pwru/pwru /usr/local/bin/ |