Use heredoc

This commit is contained in:
Andrew Ferrazzutti 2024-02-05 09:08:23 -05:00
parent 613c35fa5b
commit 1c641e2f1c
2 changed files with 12 additions and 2 deletions

View file

@ -5,7 +5,13 @@ RUN apk add --no-cache git ca-certificates build-base su-exec olm-dev
COPY . /build
WORKDIR /build
ARG DBG=0
RUN /bin/bash -c 'if [[ $DBG -eq 1 ]]; then go install github.com/go-delve/delve/cmd/dlv@latest; else touch /go/bin/dlv; fi'
RUN <<EOF
if [[ $DBG -eq 1 ]]; then
go install github.com/go-delve/delve/cmd/dlv@latest
else
touch /go/bin/dlv
fi
EOF
RUN ./build.sh -o /usr/bin/mautrix-whatsapp
FROM alpine:3.19

View file

@ -5,7 +5,11 @@ RUN apk add --no-cache git ca-certificates build-base su-exec olm-dev bash jq yq
COPY . /build
WORKDIR /build
ARG DBG=0
RUN /bin/bash -c 'if [[ $DBG -eq 1 ]]; then go install github.com/go-delve/delve/cmd/dlv@latest; else touch /go/bin/dlv; fi'
if [[ $DBG -eq 1 ]]; then
go install github.com/go-delve/delve/cmd/dlv@latest
else
touch /go/bin/dlv
fi
RUN ./build.sh -o /mautrix-whatsapp
# Setup development stack using gow