forked from AdaGold/task-list
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.old
More file actions
48 lines (35 loc) · 1.1 KB
/
Dockerfile.old
File metadata and controls
48 lines (35 loc) · 1.1 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
# Starting from a minimalist image
FROM ruby:2.6.5
# Reference for help contact me
LABEL maintainer="chris@adadev.org"
RUN apt-get update && apt-get install -y \
curl \
build-essential \
postgresql \
libpq-dev &&\
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt-get install -y nodejs yarn
RUN service postgresql start
RUN psql -c "CREATE ROLE tasklist WITH LOGIN PASSWORD 'tasklist' " postgres
# Create a directory for the app
RUN mkdir /app
# Set the working directory for RUN, ADD and COPY
WORKDIR /app
# Add entire student fork (overwrites previously added files)
#ARG SUBMISSION_SUBFOLDER
#ADD $SUBMISSION_SUBFOLDER /app
COPY Gemfile .
COPY Gemfile.lock .
RUN gem install bundler
RUN bundle install
COPY . .
# If needed copy original Gemfile
# COPY ./Gemfile .
RUN yarn install
# Overwrite the script and test files
ADD test.sh /app
ADD test /app
RUN chmod +x test.sh
CMD ["/app/test.sh"]