-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathDockerfile.dev
60 lines (48 loc) · 1.23 KB
/
Dockerfile.dev
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
FROM ruby:2.6.6-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 \
python2 \
ttf-ubuntu-font-family \
git \
postgresql-dev \
postgresql-client \
libxml2-dev \
libxslt-dev \
nodejs \
yarn \
imagemagick \
tzdata \
less \
zsh \
sqlite-dev \
npm \
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/*
# install ember
RUN npm install -g ember-cli
# Change to app dir
WORKDIR $APP_PATH
EXPOSE $RAILS_PORT
ENTRYPOINT [ "bundle", "exec" ]