Skip to content

Migrate ruby-postgres to mise #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 21 additions & 19 deletions build-images/ruby-postgres.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
FROM ghcr.io/code0-tech/build-images/asdf:131.1
SHELL ["/usr/bin/bash", "-lc"]
FROM ghcr.io/code0-tech/build-images/mise:131.1

RUN apt-get update && apt-get install \
build-essential \
libssl-dev \
libreadline-dev \
zlib1g-dev \
libcurl4-openssl-dev \
uuid-dev \
icu-devtools \
libicu-dev \
libyaml-dev \
-y
RUN apt-get update \
&& apt-get install \
build-essential \
libssl-dev \
libreadline-dev \
zlib1g-dev \
libcurl4-openssl-dev \
uuid-dev \
libicu-dev \
libyaml-dev \
flex \
bison \
-y \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

RUN asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
RUN asdf plugin add postgres https://github.com/smashedtoatoms/asdf-postgres.git

ARG RUBY_VERSION
RUN asdf install ruby $RUBY_VERSION
ARG POSTGRES_VERSION
RUN POSTGRES_EXTRA_CONFIGURE_OPTIONS="--without-icu" POSTGRES_SKIP_INITDB=true asdf install postgres $POSTGRES_VERSION
ARG RUBY_VERSION
RUN echo "POSTGRES_SKIP_INITDB=true" > .install-env \
&& echo "POSTGRES_EXTRA_CONFIGURE_OPTIONS=--without-icu" >> .install-env \
&& MISE_ENV_FILE=.install-env mise install postgres@$POSTGRES_VERSION ruby@$RUBY_VERSION \
&& rm .install-env