forked from webappio/livechat-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Layerfile
30 lines (23 loc) · 1.26 KB
/
Layerfile
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
FROM vm/ubuntu:18.04
# install docker-ce (from tutorial for ubuntu)
RUN apt-get update && \
apt-get install ca-certificates curl gnupg lsb-release && \
sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" |\
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && \
apt-get update && \
apt-get install docker-ce docker-ce-cli containerd.io
# install docker compose
RUN curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose
# copy the root (i.e., repository root) to /root in the runner
COPY / /root
# TODO: log in to docker hub
# See https://webapp.io/docs/advanced-workflows#logging-in-to-docker to learn how to log in to docker
RUN REPEATABLE docker-compose build --parallel
RUN docker-compose up -d
# TODO: change port to whatever is configured in your docker-compose.yml
EXPOSE WEBSITE localhost:8000
RUN docker-compose exec cypress bash /app/run_tests.sh