mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
add docker dev environment
This commit is contained in:
committed by
Tienson Qin
parent
b40b5925f7
commit
5b4ca742a6
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM clojure:openjdk-11-tools-deps
|
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup_15.x | bash - && \
|
||||
apt-get install -y nodejs
|
||||
|
||||
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
||||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y yarn
|
||||
|
||||
RUN useradd -ms /bin/bash logseq
|
||||
|
||||
USER logseq
|
||||
WORKDIR /home/logseq
|
||||
|
||||
EXPOSE 3001
|
||||
EXPOSE 9630
|
||||
EXPOSE 8701
|
||||
29
README.md
29
README.md
@@ -87,3 +87,32 @@ Open <http://localhost:3001>.
|
||||
``` bash
|
||||
yarn release
|
||||
```
|
||||
|
||||
## Alternative: Docker based development environment
|
||||
|
||||
### 1. Fetch sources
|
||||
|
||||
``` bash
|
||||
git clone https://github.com/logseq/logseq
|
||||
```
|
||||
|
||||
### 2. Build Docker image
|
||||
|
||||
``` bash
|
||||
cd logseq
|
||||
docker build -t logseq-docker .
|
||||
```
|
||||
|
||||
### 3. Run Docker container
|
||||
|
||||
``` bash
|
||||
docker run -v $(pwd):/home/logseq/logseq -p 3001:3001 -p 9630:9630 -p 8701:8701 --rm -it logseq-docker /bin/bash
|
||||
```
|
||||
|
||||
### 4. Inside the container compile as described above
|
||||
|
||||
``` bash
|
||||
cd logseq
|
||||
yarn
|
||||
yarn watch
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user