Skip to content

Commit

Permalink
fix: enable gracefully stopping Docker container (#554)
Browse files Browse the repository at this point in the history
The pre-built Docker image had two minor problems:
1. It could not be built on M1 Macs, because the internal build container used an '-alpine'
   image, which do not support the M1 architecture.
2. Docker containers based on this image could not be gracefully stopped because these used
   `eval` instead of `exec`. This again means that PGAdapter itself was started as a subprocess
   in the container, and the sigterm signal is not propagated to any subprocess inside the
   container.

Fixes #552 and #553
  • Loading branch information
olavloite committed Jan 6, 2023
1 parent b261431 commit 80e9c8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILD #
################################################################################

FROM maven:3.8.4-eclipse-temurin-17-alpine AS build
FROM maven:3.8.6-eclipse-temurin-17 AS build

# Copy over build files to docker image.
COPY LICENSE ./
Expand Down
2 changes: 1 addition & 1 deletion build/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ done
cd /home/pgadapter
COMMAND="java ${JAVA_ARGUMENTS} -jar pgadapter.jar ${ARGUMENTS}"
echo $COMMAND
eval " $COMMAND"
exec $COMMAND

0 comments on commit 80e9c8b

Please sign in to comment.