Skip to content

Commit

Permalink
build(docker): add amd64 to to dockerfile as dep
Browse files Browse the repository at this point in the history
  • Loading branch information
danvergara committed Jan 2, 2024
1 parent 3428827 commit c9e7cb1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:22.04 AS build

ARG GO_VERSION
ARG GO_VERSION TARGETOS TARGETARCH

ENV GO_VERSION=${GO_VERSION}
ENV GOPATH /go
Expand All @@ -11,6 +11,7 @@ RUN apt-get update && \
add-apt-repository ppa:strukturag/libde265 && \
add-apt-repository ppa:strukturag/libheif && \
apt-get install -y --no-install-recommends cmake \
gcc-x86-64-linux-gnu libc6-dev-amd64-cross \
wget \
git \
gcc \
Expand Down Expand Up @@ -42,7 +43,7 @@ RUN go mod download

COPY . .

RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o /app/morphos .
RUN CGO_ENABLED=1 GOOS=${TARGETOS} GOARCH=${TARGETARCH} CC=x86_64-linux-gnu-gcc go build -o /app/morphos .

FROM ubuntu:22.04

Expand Down

0 comments on commit c9e7cb1

Please sign in to comment.