Skip to content

Commit

Permalink
Add Docker setup for a CivBuddy build environment with NodeJS v8
Browse files Browse the repository at this point in the history
  • Loading branch information
tsjensen committed Aug 21, 2023
1 parent eb6bc50 commit 3177cbf
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/resources/i18n/*.ftl linguist-language=INI

/docker/.vimrc text eol=lf
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
*.iml
*.ipr
*.iws
/docker/.ssh/
2 changes: 2 additions & 0 deletions docker/.vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set bg=dark
syn on
14 changes: 14 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:8-buster

COPY .vimrc /root
COPY .ssh /root/.ssh/

RUN apt-get update && \
apt-get install -y vim man && \
chmod 644 /root/.vimrc && \
echo 'alias ll="ls -lF --color=auto"' >> /root/.bashrc && \
chmod 700 /root/.ssh && \
chmod 644 /root/.ssh/* && \
chmod 600 /root/.ssh/id_ed25519

WORKDIR /build
17 changes: 17 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# docker

This folder contains some supplementary files for setting up a Docker environment on the local machine for building
CivBuddy. It is not part of the CivBuddy app.

Prerequisites:

1. [Add SSH keys to GitHub](https://docs.github.com/en/authentication/connecting-to-github-with-ssh)
2. Provide them in /docker/.ssh/ so that they can be included with the container

In this folder:

- `docker build -t civbuddy-node:8 --progress plain .`
- `docker run --rm -it -vC:\path\to\civbuddy:/build --entrypoint=/bin/bash civbuddy-node:8`
- `cd /build`
- `npm install`
- `npm run build` (or whatever other command)

0 comments on commit 3177cbf

Please sign in to comment.