-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (31 loc) · 1.17 KB
/
Dockerfile
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
39
40
41
42
43
44
FROM ruby:3.1.3-alpine3.15
ENV APP_HOME /app
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
RUN apk add --update --no-cache tzdata && \
cp /usr/share/zoneinfo/Europe/London /etc/localtime && \
echo "Europe/London" > /etc/timezone
COPY .tool-versions Gemfile Gemfile.lock ./
RUN apk add --update --no-cache --virtual build-dependances \
postgresql-dev build-base && \
apk add --update --no-cache libpq yarn && \
bundle install --jobs=4 && \
rm -rf /usr/local/bundle/cache && \
apk del build-dependances
# Remove once base image ruby:3.1.3-alpine3.15 has been updated with latest libraries
RUN apk add --no-cache ncurses-libs=6.3_p20211120-r2
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile && \
yarn cache clean
COPY . .
RUN echo export PATH=/usr/local/bin:\$PATH > /root/.ashrc
ENV ENV="/root/.ashrc"
ARG COMMIT_SHA
ENV COMMIT_SHA=$COMMIT_SHA
ARG GOVUK_NOTIFY_API_KEY
ENV GOVUK_NOTIFY_API_KEY=$GOVUK_NOTIFY_API_KEY
ARG GOVUK_NOTIFY_GENERIC_EMAIL_TEMPLATE_ID
ENV GOVUK_NOTIFY_GENERIC_EMAIL_TEMPLATE_ID=$GOVUK_NOTIFY_GENERIC_EMAIL_TEMPLATE_ID
RUN bundle exec rake assets:precompile && \
rm -rf node_modules tmp
CMD ./bin/app-startup.sh