diff --git a/CHANGELOG.md b/CHANGELOG.md index 382c886..604c602 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.2.57 + +- Fixed Dockerfile to set `GOROOT` to `/usr/lib/go` when using system Go (`GO_VERSION=system`) instead of always using `/usr/local/go`. + ## 2.2.56 - Removed process timeout from reachability analysis subprocess. Timeouts are now only passed to the Coana CLI via the `--analysis-timeout` flag. diff --git a/Dockerfile b/Dockerfile index 4f31e10..c4d483a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,8 @@ RUN apk update && apk add --no-cache \ # Install Go with version control RUN if [ "$GO_VERSION" = "system" ]; then \ - apk add --no-cache go; \ + apk add --no-cache go && \ + echo "/usr/lib/go" > /etc/goroot; \ else \ cd /tmp && \ ARCH=$(uname -m) && \ @@ -31,7 +32,8 @@ RUN if [ "$GO_VERSION" = "system" ]; then \ esac && \ wget https://golang.org/dl/go${GO_VERSION}.linux-${GOARCH}.tar.gz && \ tar -C /usr/local -xzf go${GO_VERSION}.linux-${GOARCH}.tar.gz && \ - rm go${GO_VERSION}.linux-${GOARCH}.tar.gz; \ + rm go${GO_VERSION}.linux-${GOARCH}.tar.gz && \ + echo "/usr/local/go" > /etc/goroot; \ fi # Install Java with version control @@ -64,8 +66,7 @@ RUN npm install @coana-tech/cli socket -g && \ rustup component add rustfmt clippy # Set environment paths -ENV PATH="/usr/local/go/bin:/root/.cargo/bin:${PATH}" -ENV GOROOT="/usr/local/go" +ENV PATH="/usr/local/go/bin:/usr/lib/go/bin:/root/.cargo/bin:${PATH}" ENV GOPATH="/go" # Install uv diff --git a/pyproject.toml b/pyproject.toml index 8ef524c..e2f22b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "socketsecurity" -version = "2.2.56" +version = "2.2.57" requires-python = ">= 3.10" license = {"file" = "LICENSE"} dependencies = [ diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh index e190c6d..2679340 100755 --- a/scripts/docker-entrypoint.sh +++ b/scripts/docker-entrypoint.sh @@ -4,6 +4,9 @@ # docker run socketdev/cli socketcli --params # docker run socketdev/cli --cli-params +# Set GOROOT from the value determined at build time +export GOROOT=$(cat /etc/goroot) + # Check if we have any arguments if [ $# -eq 0 ]; then # No arguments provided, run socketcli with no args (will show help) diff --git a/socketsecurity/__init__.py b/socketsecurity/__init__.py index b9372d7..798b847 100644 --- a/socketsecurity/__init__.py +++ b/socketsecurity/__init__.py @@ -1,3 +1,3 @@ __author__ = 'socket.dev' -__version__ = '2.2.56' +__version__ = '2.2.57' USER_AGENT = f'SocketPythonCLI/{__version__}'