diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bf41330 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +FROM python:3.12.3-slim-bookworm + +ARG CONFIG_PATH=pg-migration-tool/config.example.yaml + +ENV TERM=xterm-256color + +ENV COLORTERM=truecolor + +RUN apt-get update && apt-get -y upgrade + +RUN apt-get install -y libpq-dev gcc xterm + +RUN pip install pipenv + +RUN useradd -m pgmigrator + +USER pgmigrator + +WORKDIR /app + +COPY Pipfile ./ + +COPY Pipfile.lock ./ + +COPY pg-migration-tool/main.py ./pg-migration-tool/ + +COPY pg-migration-tool/select.tcss ./pg-migration-tool/ + +COPY $CONFIG_PATH ./pg-migration-tool/config.yaml + +RUN pipenv install + +ENTRYPOINT ["pipenv", "run", "python"] + +CMD ["pg-migration-tool/main.py"] diff --git a/pg-migration-tool/config.yaml b/pg-migration-tool/config.example.yaml similarity index 100% rename from pg-migration-tool/config.yaml rename to pg-migration-tool/config.example.yaml