Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Stage 1: Build the Go agent binary
FROM debian:stable-slim AS builder

RUN apt update && apt install -y protobuf-compiler git wget build-essential
RUN apt-get update && apt-get upgrade -y && apt-get install -y protobuf-compiler git wget build-essential
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if we put these on separate lines we'll get better caching?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I remembered that trick too but turns out that is antipattern lol. Seperate RUN means new more layers and may increase size of the image


ENV GOLANG_VERSION=1.26.1
RUN wget -q "https://dl.google.com/go/go${GOLANG_VERSION}.linux-$(dpkg --print-architecture).tar.gz" -O /tmp/go.tar.gz \
Expand All @@ -22,13 +22,13 @@ FROM debian:stable-slim
WORKDIR /agent

# Install dependencies
RUN apt update && apt install -y protobuf-compiler git python3 python3-venv wget build-essential openssl jq
RUN apt-get update && apt-get upgrade -y && apt-get install -y protobuf-compiler git python3 python3-venv wget build-essential openssl jq

# Install NodeJS and Snyk Broker
ENV NODE_VERSION=20

ARG SNYK_BROKER_VERSION=v1.0.7-axon
RUN wget -q -O - https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - && apt install -y nodejs
RUN wget -q -O - https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - && apt-get install -y nodejs
RUN npm install --global npm@latest typescript@4.9.3
RUN git clone https://github.com/cortexapps/snyk-broker.git /tmp/snyk-broker && \
cd /tmp/snyk-broker && \
Expand Down
Loading