Skip to content

Commit 11bb91f

Browse files
authored
SNOW-1937440 Fix docker image (#1313)
1 parent 0247a26 commit 11bb91f

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test_setup: test_teardown
1313
python3 ci/scripts/hang_webserver.py 12345 &
1414

1515
test_teardown:
16-
kill -9 $$(ps -ewf | grep hang_webserver | grep -v grep | awk '{print $$2}') || true
16+
kill -9 $$(ps -ef | grep hang_webserver | grep -v grep | awk '{print $$1}') || true
1717

1818
test: deps test_setup
1919
./ci/scripts/execute_tests.sh

ci/image/scripts/entrypoint.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
#!/bin/bash -x
1+
#!/bin/bash -ex
22
# Add local user
33
# Either use the LOCAL_USER_ID if passed in at runtime or
44
# fallback
55

66
USER_ID=${LOCAL_USER_ID:-9001}
77

88
echo "Starting with UID : $USER_ID"
9-
useradd --shell /bin/bash -u $USER_ID -o -c "" -m user
9+
adduser -s /bin/bash -u $USER_ID -h /home/user -D user
1010
export HOME=/home/user
11+
mkdir -p /home/user/.cache
12+
chown user:user /home/user/.cache
13+
14+
exec gosu user "$@"
1115

12-
exec /usr/local/bin/gosu user "$@"

ci/scripts/execute_tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ cd $TOPDIR
1515
if [[ -n "$JENKINS_HOME" ]]; then
1616
export WORKSPACE=${WORKSPACE:-/mnt/workspace}
1717
go install github.com/jstemmer/go-junit-report/v2@latest
18-
go test $GO_TEST_PARAMS -timeout 90m -race -v . | go-junit-report -iocopy -out $WORKSPACE/junit-go.xml
18+
go test $GO_TEST_PARAMS -timeout 90m -race -v . | /home/user/go/bin/go-junit-report -iocopy -out $WORKSPACE/junit-go.xml
1919
else
2020
go test $GO_TEST_PARAMS -timeout 90m -race -coverprofile=coverage.txt -covermode=atomic -v .
2121
fi

0 commit comments

Comments
 (0)