-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (27 loc) · 1.19 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
FROM ruby:2.6
MAINTAINER Donapieppo <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get install -y -y --no-install-recommends mysql-client libmariadbclient18 git apt-transport-https vim locales
RUN echo 'deb https://deb.nodesource.com/node_10.x stretch main' > /etc/apt/sources.list.d/nodesource.list
RUN echo 'deb https://dl.yarnpkg.com/debian/ stable main' > /etc/apt/sources.list.d/yarn.list
RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN apt-get update \
&& apt-get install nodejs yarn \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
COPY Gemfile* ./
RUN bundle install
COPY . .
# configuration
RUN ["/bin/cp", "doc/dm_unibo_common_docker.yml", "config/dm_unibo_common.yml"]
RUN ["/bin/cp", "doc/got_example_docker.rb", "config/initializers/got.rb"]
RUN ["/bin/cp", "doc/docker_database.yml", "config/database.yml"]
RUN ["/bin/cp", "doc/docker_seeds.rb", "db/seeds.rb"]
# old without docker compose
# db
#RUN ["rake", "db:create"]
#RUN ["rake", "db:schema:load"]
#EXPOSE 3000
#CMD ["rails", "server", "-b", "0.0.0.0"]