Skip to content

Commit 2b6b2f0

Browse files
committed
Update aws go installation from official source and fix typo
1 parent 6882cf5 commit 2b6b2f0

File tree

2 files changed

+29
-7
lines changed

2 files changed

+29
-7
lines changed

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ python-venv
88
regression-*
99
*_code
1010

11-
# ignore, will building docker image
11+
# ignore, while building docker image
1212
scylladb-volume/
Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,45 @@
11
ARG BASE_IMAGE
22
FROM ${BASE_IMAGE}
33

4+
# Define Go version as build argument with default
5+
ARG GO_VERSION=1.23.0
6+
ARG TARGETARCH=amd64
7+
48
#######################################
5-
# useradd, groupmod
6-
RUN yum install -y shadow-utils
9+
# Install required utilities
10+
RUN yum install -y shadow-utils wget ca-certificates tar zip
11+
12+
# Install gosu for running commands as another user
713
ENV GOSU_VERSION 1.14
814
# https://github.com/tianon/gosu/releases/tag/1.14
915
# key https://keys.openpgp.org/search?q=tianon%40debian.org
1016
RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64" \
1117
&& chmod +x /usr/local/bin/gosu
1218

19+
# Download and install Go
20+
RUN wget -q "https://go.dev/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz" -O go.tar.gz && \
21+
echo "Downloading Go ${GO_VERSION} for ${TARGETARCH}" && \
22+
# Remove any previous Go installation
23+
rm -rf /usr/local/go && \
24+
tar -C /usr/local -xzf go.tar.gz && \
25+
rm go.tar.gz
26+
27+
# Add Go to PATH permanently
28+
ENV PATH="/usr/local/go/bin:${PATH}"
1329

30+
# Verify installation
31+
RUN go version
32+
33+
# Set up SeBS environment
1434
RUN mkdir -p /sebs/
1535
COPY dockerfiles/golang_installer.sh /sebs/installer.sh
1636
COPY dockerfiles/entrypoint.sh /sebs/entrypoint.sh
17-
RUN chmod +x /sebs/entrypoint.sh
37+
RUN chmod +x /sebs/installer.sh /sebs/entrypoint.sh
1838

1939
# useradd and groupmod is installed in /usr/sbin which is not in PATH
20-
ENV PATH=/usr/sbin:$PATH
40+
ENV PATH=/usr/sbin:${PATH}
2141
ENV SCRIPT_FILE=/mnt/function/package.sh
22-
CMD /bin/bash /sebs/installer.sh
23-
ENTRYPOINT ["/sebs/entrypoint.sh"]
42+
43+
# Set the entry point and command
44+
ENTRYPOINT ["/sebs/entrypoint.sh"]
45+
CMD ["/bin/bash", "/sebs/installer.sh"]

0 commit comments

Comments
 (0)