-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile-dev
46 lines (37 loc) · 1.13 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
# Dockerfile
# Use ruby image to build our own image
# TODO: change based when we change version of ruby
FROM --platform=linux/x86_64 ruby:3.1.2-alpine as base
# Ensure that we work in UTF 8
ENV LANG C.UTF-8 # ensure that the encoding is UTF8
ENV LANGUAGE C.UTF-8 # ensure that the encoding is UTF8
# Specify an external volume for the Application source
VOLUME ["/opt/draw"]
WORKDIR /opt/draw
# Use a persistent volume for the gems installed by the bundler
ENV BUNDLE_PATH /var/bundler
ENV RAILS_ENV development
# RUN apt-get update -qq && apt-get install -y build-essential libpq-dev yarn nodejs libjpeg62 imagemagick graphviz default-mysql-client
RUN apk add \
build-base \
freetds-dev \
git \
imagemagick \
less \
netcat-openbsd \
mysql-client \
mysql-dev \
pkgconfig \
openssl \
shared-mime-info \
tzdata \
yarn \
&& rm -rf /var/cache/apk/*
# Install bundler for this Docker image
RUN gem install bundler:2.3.26
# pre-install bundle for speed later
ADD ./Gemfile /opt/draw/Gemfile
RUN bundle install
# We expose the port
EXPOSE 3000
CMD ["tail", "-f", "/dev/null"]