Skip to content

Commit 49781a6

Browse files
committed
Migrate ruby-postgres to mise
1 parent 731fada commit 49781a6

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tools]
2+
postgres = { install_env = { POSTGRES_SKIP_INITDB = "true", POSTGRES_EXTRA_CONFIGURE_OPTIONS="--without-icu" } }

build-images/ruby-postgres.Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
FROM ghcr.io/code0-tech/build-images/asdf:131.1
2-
SHELL ["/usr/bin/bash", "-lc"]
1+
FROM ghcr.io/code0-tech/build-images/mise:131.1
32

43
RUN apt-get update && apt-get install \
54
build-essential \
@@ -13,10 +12,11 @@ RUN apt-get update && apt-get install \
1312
libyaml-dev \
1413
-y
1514

16-
RUN asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
17-
RUN asdf plugin add postgres https://github.com/smashedtoatoms/asdf-postgres.git
18-
19-
ARG RUBY_VERSION
20-
RUN asdf install ruby $RUBY_VERSION
2115
ARG POSTGRES_VERSION
22-
RUN POSTGRES_EXTRA_CONFIGURE_OPTIONS="--without-icu" POSTGRES_SKIP_INITDB=true asdf install postgres $POSTGRES_VERSION
16+
ARG RUBY_VERSION
17+
ADD build-images/mise/mise.ruby-postgres.toml ./mise.toml
18+
RUN mise trust && \
19+
mise config set tools.postgres.version $POSTGRES_VERSION -t string && \
20+
mise config set tools.ruby.version $RUBY_VERSION -t string && \
21+
mise install && \
22+
rm mise.toml

0 commit comments

Comments
 (0)