Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
Updated files based on forked repo from CareerJSM/emberjs-docker-test…
Browse files Browse the repository at this point in the history
…ing (#1)

* Updated files based on forked repo from CareerJSM/emberjs-docker-testing

* Updated README.md
  • Loading branch information
sam-albon-li authored Sep 24, 2020
1 parent b72cfa7 commit 6b7aa6c
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 8 deletions.
33 changes: 25 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
# syntax=docker/dockerfile:experimental

FROM node:12.8.1
FROM node:12.8.1-stretch

RUN \
--mount=id=apt-cache,type=cache,target=/var/cache/apt \
--mount=id=apt-lib,type=cache,target=/var/lib/apt \
apt-get update --fix-missing && apt-get install -y jq
WORKDIR /downloads
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN \
--mount=id=apt-cache,type=cache,target=/var/cache/apt \
--mount=id=apt-lib,type=cache,target=/var/lib/apt \
apt-get update --fix-missing && apt-get install -y -f ./google-chrome-stable_current_amd64.deb
apt-get update -qqy && \
apt-get -qqy install xvfb fluxbox x11vnc dbus \
fontconfig \
curl \
python-dev \
gnupg wget ca-certificates apt-transport-https && \
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list && \
apt-get update -qqy && \
apt-get -qqy install google-chrome-unstable && \
ln -s /usr/bin/nodejs /usr/bin/node && \
npm install bower ember-cli -g && \
rm -rf /var/lib/apt/lists/* && \
git clone https://github.com/facebook/watchman.git && \
cd watchman && \
git checkout v4.9.0 && \
./autogen.sh && \
./configure && \
make && \
make install

COPY entrypoint.sh /entrypoint.sh

CMD ["/entrypoint.sh"]
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Docker Image for Ember Testing

This Docker image, will setup a system so your ember tests can be executed inside the container itself.

Based on repository here: https://github.com/BookerSoftwareInc/emberjs-docker-testing.

## Supported tags and respective `Dockerfile` links

- latest
- 12.8.1

## Run the Image

```
docker run --rm -ti -v $PWD:/app -p 7357:7357 careerjsm/emberjs-docker-testing:latest bash
```

### Run Your Tests

Now that you are in the container, you can run the following command `ember test --server`.
10 changes: 10 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

dt=$(date '+%d/%m/%Y %H:%M:%S');
echo "======================================="
echo "$dt. Starting container..."

#echo "Starting chrome for testing"
xvfb-run --server-args='-screen 0, 1024x768x16' google-chrome -start-maximized > /dev/null &

#(ember test --silent --reporter xunit || true) > /tmp/test_results.xml

0 comments on commit 6b7aa6c

Please sign in to comment.