-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathDockerfile.dev
More file actions
74 lines (61 loc) · 1.51 KB
/
Dockerfile.dev
File metadata and controls
74 lines (61 loc) · 1.51 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
FROM ruby:2.7-alpine
# Build ENV vars
ENV APP_PATH /var/app
ENV BUNDLE_VERSION 2.1.4
ENV BUNDLE_PATH /usr/local/bundle/gems
ENV TMP_PATH /tmp/
ENV RAILS_LOG_TO_STDOUT true
# Default Rails port
ENV RAILS_PORT 5250
# Copy entrypoint scripts and give execution permissions
COPY ./docker-entrypoint.sh /usr/local/bin/entrypoint.sh
COPY ./test-entrypoint.sh /usr/local/bin/test-entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh && chmod +x /usr/local/bin/test-entrypoint.sh
# System upgrade, setup and tooling
RUN apk --no-cache update \
&& apk --no-cache upgrade \
&& apk add --no-cache \
build-base \
python3 \
git \
postgresql-dev \
postgresql-client \
libxml2-dev \
libxslt-dev \
nodejs \
yarn \
imagemagick \
tzdata \
less \
zsh \
sqlite-dev \
npm \
nss \
freetype \
harfbuzz \
dbus \
mesa-egl \
mesa-gl \
libxkbcommon \
ttf-freefont \
alsa-lib \
udev \
chromium \
chromium-chromedriver \
gcompat
# Copy wkhtmltopdf binary with QT patches for Alpine Linux
COPY --from=madnight/docker-alpine-wkhtmltopdf /bin/wkhtmltopdf /bin/wkhtmltopdf
# Clean up and create app dir
RUN rm -rf /var/cache/apk/* \
&& mkdir -p $APP_PATH
# Install bundler
RUN gem install bundler --version "$BUNDLE_VERSION" \
&& rm -rf $GEM_HOME/cache/*
# set legacy peer deps - use legacy peer dependencies to maintain compatibility with older versions of node.js
RUN npm config set legacy-peer-deps true -g
# install ember
RUN npm install -g ember-cli --legacy-peer-deps
# Change to app dir
WORKDIR $APP_PATH
EXPOSE $RAILS_PORT
ENTRYPOINT [ "bundle", "exec" ]