I’m running a self-hosted Neon setup using Docker and would like to use the neon_local tool.
Hi,
Unfortunately no, not yet at least. It is trivial to create one by adding
COPY --from=build --chown=neon:neon /home/nonroot/target/release/neon_local /usr/local/bin
to existing Dockerfile (and adding --bin neon_local to cargo build command) though.
Unfortunately I’m unable to build the image myself due to this error
Get "http://369495373322.dkr.ecr.eu-central-1.amazonaws.com/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Fair enough. It can be workaround by first building ‘rust’ locally:
# at https://github.com/neondatabase/build/
docker build rust/ -t neondatabase/rust:local
and then in main repo
docker build . --build-arg REPOSITORY=neondatabase --build-arg TAG=local -t neondatabase/neon:local
but I’ll try to add rust image to docker hub soon as well.
It looks like the image is already in docker hub
https://hub.docker.com/r/neondatabase/rust
I was able to build just by add --build-arg REPOSITORY=neondatabase
Can you please add neon_local to the official image?
@mingfang @ars I run into the same issue trying to find a neon_local binary.
Btw, also tried to build it locally - no luck on M1 Macbook.
Could you share a final Dockerfile to make it work please?
Hey. I just opened PR to add neon_local to the image:
It the meanwhile you can checkout this PR and build there image manually with
docker build . --build-arg REPOSITORY=neondatabase -t neondatabase/neon:local
as mentioned above.
Thank you!
I’ve tried locally with a command: docker build . --build-arg REPOSITORY=neondatabase -t neondatabase/neon:local
But it fails with (might be related to M1 Macbook, not sure):
[pg-build 8/8] RUN set -e && mold -run make -j $(nproc) -s neon-pg-ext && rm -rf pg_install/build && tar -C pg_install -czf /home/nonroot/postgres_install.tar.gz .:
#0 0.324 Configuring Postgres v15 build
#0 0.326 Configuring Postgres v14 build
#0 0.389 env: ‘/home/nonroot//vendor/postgres-v14/configure’: No such file or directory
#0 0.391 env: ‘/home/nonroot//vendor/postgres-v15/configure’: No such file or directory
#0 0.394 make: *** [Makefile:75: /home/nonroot//pg_install//build/v14/config.status] Error 127
It looks like you didn’t fetch Postgres submodules; these commands should help:
git submodule init
git submodule update