mirror of https://github.com/citusdata/citus.git
various tweaks to devcontainer
parent
fbadd288e6
commit
039df87b0a
|
@ -1 +1,5 @@
|
||||||
|
# gdbpg.py contains scripts to nicely print the postgres datastructures
|
||||||
|
# while in a gdb session. Since the vscode debugger is based on gdb this
|
||||||
|
# actually also works when debugging with vscode. Providing nice tools
|
||||||
|
# to understand the internal datastructures we are working with.
|
||||||
source /root/gdbpg.py
|
source /root/gdbpg.py
|
||||||
|
|
|
@ -9,4 +9,4 @@ docopt = "*"
|
||||||
[dev-packages]
|
[dev-packages]
|
||||||
|
|
||||||
[requires]
|
[requires]
|
||||||
python_version = "3.10"
|
python_version = "3"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
},
|
},
|
||||||
"pipfile-spec": 6,
|
"pipfile-spec": 6,
|
||||||
"requires": {
|
"requires": {
|
||||||
"python_version": "3.10"
|
"python_version": "3"
|
||||||
},
|
},
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -110,8 +110,8 @@ FROM base AS pipenv
|
||||||
RUN sudo pip3 install pipenv pipenv-shebang
|
RUN sudo pip3 install pipenv pipenv-shebang
|
||||||
|
|
||||||
WORKDIR /workspaces/citus/
|
WORKDIR /workspaces/citus/
|
||||||
COPY src/ src/
|
COPY --chown=citus:citus src/ src/
|
||||||
COPY .vscode/Pipfile .vscode/Pipfile.lock .devcontainer/.vscode/
|
COPY --chown=citus:citus .vscode/Pipfile .vscode/Pipfile.lock .devcontainer/.vscode/
|
||||||
RUN ( cd src/test/regress && pipenv install )
|
RUN ( cd src/test/regress && pipenv install )
|
||||||
RUN ( cd .devcontainer/.vscode && pipenv install )
|
RUN ( cd .devcontainer/.vscode && pipenv install )
|
||||||
|
|
||||||
|
@ -143,6 +143,14 @@ RUN sudo apt update \
|
||||||
|
|
||||||
RUN sudo pip3 install pipenv pipenv-shebang
|
RUN sudo pip3 install pipenv pipenv-shebang
|
||||||
|
|
||||||
|
# Since gdb will run in the context of the root user when debugging citus we will need to both
|
||||||
|
# download the gdbpg.py script as the root user, into their home directory, as well as add .gdbinit
|
||||||
|
# as a file owned by root
|
||||||
|
# This will make that as soon as the debugger attaches to a postgres backend (or frankly any other process)
|
||||||
|
# the gdbpg.py script will be sourced and the developer can direcly use it.
|
||||||
|
RUN sudo curl -o /root/gdbpg.py https://raw.githubusercontent.com/tvesely/gdbpg/master/gdbpg.py
|
||||||
|
COPY --chown=root:root .gdbinit /root/
|
||||||
|
|
||||||
# add some common tools to the final container
|
# add some common tools to the final container
|
||||||
# bin directory for user tools
|
# bin directory for user tools
|
||||||
RUN mkdir .bin
|
RUN mkdir .bin
|
||||||
|
@ -160,11 +168,11 @@ RUN git clone https://github.com/so-fancy/diff-so-fancy.git \
|
||||||
|
|
||||||
COPY --link --from=uncrustify-builder /uncrustify/usr/ /usr/
|
COPY --link --from=uncrustify-builder /uncrustify/usr/ /usr/
|
||||||
|
|
||||||
COPY --link --from=pg14 /home/citus/.pgenv-staging/ /home/citus/.pgenv/
|
COPY --link --from=pg14 --chown=citus:citus /home/citus/.pgenv-staging/ /home/citus/.pgenv/
|
||||||
COPY --link --from=pg15 /home/citus/.pgenv-staging/ /home/citus/.pgenv/
|
COPY --link --from=pg15 --chown=citus:citus /home/citus/.pgenv-staging/ /home/citus/.pgenv/
|
||||||
COPY --link --from=pg16 /home/citus/.pgenv-staging/ /home/citus/.pgenv/
|
COPY --link --from=pg16 --chown=citus:citus /home/citus/.pgenv-staging/ /home/citus/.pgenv/
|
||||||
|
|
||||||
COPY --link --from=pipenv /home/citus/.local/share/virtualenvs/ /home/citus/.local/share/virtualenvs/
|
COPY --link --from=pipenv --chown=citus:citus /home/citus/.local/share/virtualenvs/ /home/citus/.local/share/virtualenvs/
|
||||||
|
|
||||||
# place to run your cluster with citus_dev
|
# place to run your cluster with citus_dev
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
@ -175,15 +183,10 @@ COPY --chown=citus:citus .psqlrc .
|
||||||
|
|
||||||
# with the copy linking of layers github actions seem to misbehave with the ownership of the
|
# with the copy linking of layers github actions seem to misbehave with the ownership of the
|
||||||
# directories leading upto the link, hence a small patch layer to have to right ownerships set
|
# directories leading upto the link, hence a small patch layer to have to right ownerships set
|
||||||
RUN sudo chown --from=root:root citus:citus -R ~
|
# RUN sudo chown --from=root:root citus:citus -R ~
|
||||||
|
|
||||||
# sets default pg version
|
# sets default pg version
|
||||||
RUN pgenv switch 16rc1
|
RUN pgenv switch 16rc1
|
||||||
|
|
||||||
USER root
|
|
||||||
RUN curl -o /root/gdbpg.py https://raw.githubusercontent.com/tvesely/gdbpg/master/gdbpg.py
|
|
||||||
COPY .gdbinit /root/
|
|
||||||
USER citus
|
|
||||||
|
|
||||||
# make connecting to the coordinator easy
|
# make connecting to the coordinator easy
|
||||||
ENV PGPORT=9700
|
ENV PGPORT=9700
|
||||||
|
|
Loading…
Reference in New Issue