Skip to content

Commit

Permalink
Fix EOF issue when building on drone in windows. (#778)
Browse files Browse the repository at this point in the history
* When running drone exec through windows the EOF markers must be getting mixed up line endings. Changing them to normal RUN fixes the problem and allows you to build on windows that passes to a linux container.

* Use singular line instead of separate run statements.
  • Loading branch information
mattdurham authored May 6, 2024
1 parent 29baf3f commit 579fd4f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ ARG USERNAME="alloy"
LABEL org.opencontainers.image.source="https://github.com/grafana/alloy"

# Install dependencies needed at runtime.
RUN <<EOF
apt-get update
apt-get install -qy libsystemd-dev tzdata ca-certificates
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EOF
RUN apt-get update \
&& apt-get install -qy libsystemd-dev tzdata ca-certificates \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*


COPY --from=build /src/alloy/build/alloy /bin/alloy
COPY example-config.alloy /etc/alloy/config.alloy
Expand Down
14 changes: 6 additions & 8 deletions tools/build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,12 @@ FROM rfratto/viceroy:v0.4.0
# will fail on installing NodeJS for all platforms instead of just our host
# platform.
# Source: https://github.com/nodesource/distributions#installation-instructions
RUN <<EOF
apt-get update && apt-get install -qy ca-certificates curl gnupg && mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list

apt-get update && apt-get install -qy nodejs
rm -rf /var/lib/apt/lists/*
EOF

RUN apt-get update && apt-get install -qy ca-certificates curl gnupg && mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& apt-get update && apt-get install -qy nodejs \
&& rm -rf /var/lib/apt/lists/*

# Install Yarn.
#
Expand Down

0 comments on commit 579fd4f

Please sign in to comment.