Skip to content

Commit

Permalink
Dockerfile for infrastructure to test and build Javascript components
Browse files Browse the repository at this point in the history
This will allow running unit tests for the Javascript components used in
GigaDB/File Upload wizard integration in the same manner as PHP unit tests.

It also remove the needs for developer to have node/npm installed on their
development machine, which in turn allow us to not have to think of
platform idiosyncrasies between OSes (macOS, Linux, Windows).

Note that this Dockerfile only sets up the infrastructure:
the latest version of NodeJS ecosystem and a headless web browser
on the current Debian distribution.
It does not make any assumptions about the application framework
or test framework, nor does it care about deployment and assets pipeline.

However it expects to find the Javascript codebase under 
the /var/www/gigadb/app/client/web directory structure, as that's where the WORKDIR 
command is set to.
  • Loading branch information
Rija Menage authored and rija committed Sep 6, 2020
1 parent f3e183c commit 89d7253
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ops/packaging/VueDev-Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM node:13.5-buster

# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
ENV FFOX_DOWNLOAD_URL=https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-GB

RUN apt-get update && \
# Get the basics for safe building of packaged debian libraries
apt-get install -y --no-install-recommends \
apt-transport-https \
build-essential && \
# Install Firefox
apt-get install -y --no-install-recommends \
libdbus-glib-1-dev \
libx11-xcb1 \
packagekit-gtk3-module && \
wget -q -O - "${FFOX_DOWNLOAD_URL}" | tar xjv -C /opt && \
ln -s /opt/firefox/firefox /usr/local/bin/firefox && \
# Remove all temporary files to reduce bloat on that layer
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

WORKDIR /var/www/gigadb/app/client/web

0 comments on commit 89d7253

Please sign in to comment.