odyssey icon indicating copy to clipboard operation
odyssey copied to clipboard

Official docker image

Open barbiedrummer opened this issue 6 years ago • 8 comments

It will be very useful for beginners to give an official docker image. It also can be used as a tutorial for installation.

barbiedrummer avatar Jun 19 '18 15:06 barbiedrummer

FROM debian:stretch-slim as builder

WORKDIR /tmp/odyssey/
COPY . /tmp/odyssey/

RUN set -ex \
        && apt-get update \
        && apt-get install -y --no-install-recommends \
                build-essential \
                cmake \
                git \
                libssl-dev \
        && mkdir build \
        && cd build \
        && cmake -DCMAKE_BUILD_TYPE=Release .. \
        && make

FROM debian:stretch-slim

RUN set -ex \
        && apt-get update \
        && apt-get install -y --no-install-recommends libssl-dev \
        && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=builder /tmp/odyssey/build/sources/odyssey /usr/local/bin/
CMD ["/usr/local/bin/odyssey"]

I've got this multi-stage build working against a real database. I can open a PR if you'd like.

Unfortunately, the image is larger than I'd like due to https://github.com/yandex/odyssey/issues/26, but stretch-slim is relatively small.

115100 avatar Jun 29 '18 11:06 115100

@115100 thanks for example. My personal image is very similar to yours. I think it will be good to have this image ready to use in Docker Hub.

So everybody can extend it FROM odyssey:latest or simply use with docker run. docker run -v {$PWD}/odyssey.conf:/tmp/odyssey/odyssey.conf odyssey Maybe it will be also helpful to add entrypoint to use ENV variables and EXPOSE standart bouncer port 6543.

This also can be helpful because of versioning (no this repo do not use tags).

barbiedrummer avatar Jun 29 '18 18:06 barbiedrummer

@115100 could you please refer which files do you have in Dockerfile dir and are copied in COPY step? Looks like I'm missing a CMakeLists.txt file

vakaobr avatar Jul 16 '18 11:07 vakaobr

Added an example docker-compose.yml for easy cluster setup and done other cosmetic stuff.

https://gitlab.com/3manuek/docker_images/tree/master/docker/odyssey

3manuek avatar Sep 10 '18 18:09 3manuek

This is a working alpine version:

FROM alpine as builder

RUN apk add --update cmake openssl-dev build-base git

COPY . /tmp/odyssey

WORKDIR /tmp/odyssey

RUN mkdir build

WORKDIR /tmp/odyssey/build

RUN cmake -DCMAKE_BUILD_TYPE=Release ..

RUN make -j

Naturally we need to copy the artifact to a new container. I haven't begun doing that yet.

thedrow avatar Feb 02 '19 06:02 thedrow

Any news?

maxpain avatar Jan 21 '21 13:01 maxpain

@maxpain nope, sorry, not yet. We used to use docker for tests https://github.com/yandex/odyssey/tree/master/docker But it's hard to "bless" some "official" as image: no one from active contributors uses Odyssey in Docker to maintain it thoroughly.

x4m avatar Jan 21 '21 17:01 x4m

Any updates?

maxpain avatar Jul 06 '22 04:07 maxpain

It's 2024 now, asking for any update?

AkritW avatar Sep 26 '24 16:09 AkritW

Not official, but if anyone interested I made this Dockerfile, to be compatible with zalando-postgres operator. Can be used without it too. https://gitlab.com/Object905/zalando-odyssey

Sadly, it's slowly leaking memory (seems like because of auth_query)

Object905 avatar Sep 26 '24 16:09 Object905

@pmwkaa @reshke @x4m Could you please provide some feedback on this?

maxpain avatar Sep 27 '24 13:09 maxpain

Well, we have dockerized tests. You can do make run_test and it will be executed in Docker :) Probably, it's not what you are asking for, it's development container, not operational container.

Consider @Object905 's image blessed container :)

BTW AFAIK we fixed some leaks in auth_query. We'll do a release soon.

x4m avatar Sep 27 '24 13:09 x4m