-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.development
38 lines (32 loc) · 1.24 KB
/
Dockerfile.development
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
32
33
34
35
36
37
38
FROM ruby:3.3.5-alpine
RUN addgroup app --gid 1000
RUN adduser -SD -u 1000 --shell /bin/bash --home /home/app app app
ARG APPVERSION=unknown
ARG APP_BUILD_DATE=unknown
ARG APP_GIT_COMMIT=unknown
ARG APP_BUILD_TAG=unknown
# Setting up ping.json variables
ENV APPVERSION ${APPVERSION}
ENV APP_BUILD_DATE ${APP_BUILD_DATE}
ENV APP_GIT_COMMIT ${APP_GIT_COMMIT}
ENV APP_BUILD_TAG ${APP_BUILD_TAG}
EXPOSE 8080
COPY --chown=app:app . /home/app/et1
RUN chown -R app:app /usr/local/bundle
RUN apk add --no-cache libpq-dev tzdata gettext sudo shared-mime-info curl-dev file bash libc6-compat && \
apk add --no-cache postgresql-client~=11.12 --repository=http://dl-cdn.alpinelinux.org/alpine/v3.10/main && \
apk add --no-cache git build-base nodejs yarn
USER app
RUN cd /home/app/et1 && \
BUNDLER_VERSION=$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1 | awk '{$1=$1};1') && \
gem install bundler:$BUNDLER_VERSION invoker && \
bundle config set with "test development" && \
bundle config set without "production" && \
bundle config set deployment 'true' && \
bundle install && \
yarn install
ENV HOME /home/app
WORKDIR /home/app/et1
ENV RAILS_ENV=development
ENV NODE_OPTIONS=--openssl-legacy-provider
CMD ["bundle", "exec", "puma"]