Skip to content

Commit

Permalink
Fix Dockerfile
Browse files Browse the repository at this point in the history
Make it similar to `make release`.

Signed-off-by: Martynas Pumputis <[email protected]>
  • Loading branch information
brb committed Sep 13, 2024
1 parent db68c01 commit 4a5c234
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions Dockerfile
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/

0 comments on commit 4a5c234

Please sign in to comment.