-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (25 loc) · 820 Bytes
/
Dockerfile
File metadata and controls
31 lines (25 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM ruby:3.2-bullseye
ENV USER=lexicon-cli
ENV UID=1000
ENV GID=1000
RUN mkdir /lexicon-cli && \
addgroup --gid "$GID" "$USER" && \
adduser \
--disabled-password \
--gecos "" \
--home /lexicon-cli \
--ingroup "$USER" \
--no-create-home \
--uid "$UID" \
"$USER" && \
apt-get update && \
apt-get -y install postgis postgresql-client postgresql-contrib libpq-dev p7zip-full pigz libyajl-dev --no-install-recommends
WORKDIR /lexicon-cli
ENV BUNDLE_PATH=/lexicon-cli/vendor/bundle \
BUNDLER_VERSION='2.2.33'
RUN gem install bundler -v $BUNDLER_VERSION
COPY Gemfile lexicon-cli.gemspec /lexicon-cli/
RUN bundle install --jobs $(nproc) --path vendor/bundle
ADD . /lexicon-cli/
RUN chown -R lexicon-cli:lexicon-cli /lexicon-cli
USER lexicon-cli