Skip to content

Commit ef06466

Browse files
authored
Merge pull request #62 from code0-tech/migrate-ruby-postgres-to-mise
Migrate ruby-postgres to mise
2 parents 2b76473 + 3d09392 commit ef06466

1 file changed

Lines changed: 21 additions & 19 deletions

File tree

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

4-
RUN apt-get update && apt-get install \
5-
build-essential \
6-
libssl-dev \
7-
libreadline-dev \
8-
zlib1g-dev \
9-
libcurl4-openssl-dev \
10-
uuid-dev \
11-
icu-devtools \
12-
libicu-dev \
13-
libyaml-dev \
14-
-y
3+
RUN apt-get update \
4+
&& apt-get install \
5+
build-essential \
6+
libssl-dev \
7+
libreadline-dev \
8+
zlib1g-dev \
9+
libcurl4-openssl-dev \
10+
uuid-dev \
11+
libicu-dev \
12+
libyaml-dev \
13+
flex \
14+
bison \
15+
-y \
16+
&& rm -rf /var/lib/apt/lists/* \
17+
&& apt-get clean
1518

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
2119
ARG POSTGRES_VERSION
22-
RUN POSTGRES_EXTRA_CONFIGURE_OPTIONS="--without-icu" POSTGRES_SKIP_INITDB=true asdf install postgres $POSTGRES_VERSION
20+
ARG RUBY_VERSION
21+
RUN echo "POSTGRES_SKIP_INITDB=true" > .install-env \
22+
&& echo "POSTGRES_EXTRA_CONFIGURE_OPTIONS=--without-icu" >> .install-env \
23+
&& MISE_ENV_FILE=.install-env mise use -g postgres@$POSTGRES_VERSION ruby@$RUBY_VERSION \
24+
&& rm .install-env

0 commit comments

Comments
 (0)