From 630b20ba49fdc9522338740acc9cd7b4c4f3ca45 Mon Sep 17 00:00:00 2001 From: Om Mishra <32200996+mishraomp@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:24:14 -0800 Subject: [PATCH] feat: add lean alpine image with psql client --- alpine/psql/Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 alpine/psql/Dockerfile diff --git a/alpine/psql/Dockerfile b/alpine/psql/Dockerfile new file mode 100644 index 0000000..810e37c --- /dev/null +++ b/alpine/psql/Dockerfile @@ -0,0 +1,23 @@ +# Use the official Alpine image as a base +FROM alpine:3.20 + +# Install the PostgreSQL client +RUN apk --no-cache add postgresql-client + +# Set the working directory +WORKDIR /app + +# Copy your script or SQL files into the container +# COPY your_script.sh /app/your_script.sh +# COPY your_sql_file.sql /app/your_sql_file.sql + +# Ensure the script is executable (if you have a script) +# RUN chmod +x /app/your_script.sh + +# Set the entrypoint to the psql client or your script +# ENTRYPOINT ["/app/your_script.sh"] +# Or if you want to use psql directly +ENTRYPOINT ["psql"] + +# Optionally, you can set default command arguments +# CMD ["-h", "your_host", "-U", "your_user", "-d", "your_db"] \ No newline at end of file