Skip to content

Commit

Permalink
Container environment (#59)
Browse files Browse the repository at this point in the history
* Add base dockerfile

* Add -E flag to pass env vars into apt command

* Add compose for running browser datastation

* Add running with docker documentation

* Embed install steps, use node base

Co-authored-by: Phil Eaton <phil@eatonphil.com>
  • Loading branch information
Alexander Comerford and eatonphil committed Oct 11, 2021
1 parent 40a78dc commit ad1729e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
@@ -0,0 +1,13 @@
FROM node:16
RUN apt-get update -y && \
apt-get install cmake xvfb jq curl sudo fswatch git g++ -y && \
rm -rf /var/lib/apt/lists/*
COPY --chown=root:root scripts/ci/prepare_linux.sh /usr/sbin/
RUN export DEBIAN_FRONTEND=noninteractive
RUN sudo npm install --global yarn
RUN yarn

RUN groupadd --gid 1000 datastation \
&& useradd --home-dir /home/datastation --create-home --uid 1000 \
--gid 1000 --shell /bin/bash --skel /dev/null datastation
USER datastation
8 changes: 8 additions & 0 deletions HACKING.md
Expand Up @@ -27,6 +27,14 @@ yarn build-ui

And manually start a web-server: `python3 -m http.server --port 8080 build`.

### Via Docker

To build and run the in-browser application via `docker` and `docker-compose`:

```
docker-compose -f docker-compose-browser.yml build
docker-compose -f docker-compose-browser.yml up
```

## Build and run the desktop app

Expand Down
11 changes: 11 additions & 0 deletions docker-compose-browser.yml
@@ -0,0 +1,11 @@
version: "3.9"
services:
datastation:
image: datastation:latest
build: .
ports:
- "8080:8080"
volumes:
- ./:/home/datastation/datastation:Z
entrypoint: "sh -c"
command: ["cd ~/datastation && yarn && yarn start-ui"]

0 comments on commit ad1729e

Please sign in to comment.