FROM alpine:latest WORKDIR . ENV GIT_REPO https://github.com/marcua/ayb RUN apk add git clang lld rust cargo openssl openssl-dev RUN git clone $GIT_REPO WORKDIR ./ayb COPY . . RUN git fetch --tags RUN git checkout $(git describe --tags `git rev-list --tags --max-count=1`) RUN cargo build --release RUN echo "#!/bin/sh" >> create_config RUN echo "[ ! -f ayb.toml ] && cargo run --release -- default_server_config > ayb.toml" >> create_config RUN chmod +x create_config RUN /ayb/create_config CMD ["cargo", "run", "--release"] EXPOSE 5433