This repository was archived by the owner on May 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 22
33# Build the Nixster binary
44# Note that the `nixster` binary produced will include native modules
5- # e.g. better-sqlite3.node for the platform it is built on (so it needs
5+ # e.g. ` better-sqlite3.node` for the platform it is built on (so it needs
66# to be a Linux builder to run on Linux-based Docker image)
7+ # You can test this stage alone by building and running like this:
8+ # docker build . --target builder --tag stencila/nixster:builder
9+ # docker run --rm -it -p 3000:3000 stencila/nixster:builder ./build/nixster serve
710
811FROM node:10 AS builder
912WORKDIR /nixster
@@ -73,4 +76,11 @@ RUN nix-channel --add https://nixos.org/channels/nixos-18.09 \
7376 && nix-channel --update \
7477 && nixster update nixos-18.09
7578
79+ # Install Docker (only the client is used in this image, the daemon runs elsewhere)
80+ # HT to https://stackoverflow.com/a/43594065
81+ ENV DOCKERVERSION=18.09.1
82+ RUN wget https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKERVERSION}.tgz \
83+ && tar xzvf docker-${DOCKERVERSION}.tgz --strip 1 -C /usr/local/bin docker/docker \
84+ && rm docker-${DOCKERVERSION}.tgz
85+
7686CMD nixster serve
Original file line number Diff line number Diff line change @@ -37,7 +37,11 @@ docker-build:
3737
3838# Run the Nixster server
3939docker-serve :
40- docker run --rm --interactive --tty --volume $$ PWD/nixstore:/nixstore --publish 3000:3000 stencila/nixster nixster serve
40+ docker run --rm --interactive --tty \
41+ --volume $$ PWD/nixstore:/nixstore \
42+ --volume /var/run/docker.sock:/var/run/docker.sock \
43+ --publish 3000:3000 \
44+ stencila/nixster nixster serve
4145
4246# Interact with the container in a Bash shell. Useful for debugging build errors
4347docker-interact :
You can’t perform that action at this time.
0 commit comments