Skip to content

Commit 5849e3c

Browse files
uruwhydeacon-mpCopilot
authored
Use updated golang version in dockerfile (#3202)
* Use updated golang version in dockerfile * fix update-agents script tr * uncomment * Update Dockerfile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: deacon-mp <61169193+deacon-mp@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 18529aa commit 5849e3c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Dockerfile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,27 @@ COPY --from=ui-build /usr/src/app/plugins/magma/dist /usr/src/app/plugins/magma/
4040
# From https://docs.docker.com/build/building/best-practices/
4141
# Install caldera dependencies
4242
RUN apt-get update && \
43-
apt-get --no-install-recommends -y install git curl unzip python3-dev python3-pip golang-go mingw-w64 zlib1g gcc && \
43+
apt-get --no-install-recommends -y install git curl unzip python3-dev python3-pip mingw-w64 zlib1g gcc && \
4444
rm -rf /var/lib/apt/lists/*
4545

46+
# Install Golang from source (apt version is too out-of-date)
47+
RUN curl -k -L https://go.dev/dl/go1.25.0.linux-amd64.tar.gz -o go1.25.0.linux-amd64.tar.gz && \
48+
tar -C /usr/local -xzf go1.25.0.linux-amd64.tar.gz && rm go1.25.0.linux-amd64.tar.gz
49+
ENV PATH="$PATH:/usr/local/go/bin"
50+
RUN go version
51+
4652
# Fix line ending error that can be caused by cloning the project in a Windows environment
47-
RUN cd /usr/src/app/plugins/sandcat; tr -d '\15\32' < ./update-agents.sh > ./update-agents.sh
53+
RUN cd /usr/src/app/plugins/sandcat && \
54+
cp ./update-agents.sh ./update-agents_orig.sh && \
55+
tr -d '\15\32' < ./update-agents_orig.sh > ./update-agents.sh
4856

4957
# Set timezone (default to UTC)
5058
ARG TZ="UTC"
5159
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
5260
echo $TZ > /etc/timezone
5361

5462
# Install pip requirements
55-
RUN pip3 install --break-system-packages --no-cache-dir -r requirements.txt
63+
RUN pip3 install --break-system-packages --no-cache-dir -r requirements.txt
5664

5765
# For offline atomic (disable it by default in slim image)
5866
# Disable atomic if this is not downloaded

0 commit comments

Comments
 (0)