Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suport for running in Docker #20

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
slack-archive_USERDATA
.git
.gitignore
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:16

WORKDIR /slack-archive

COPY *.json ./
COPY yarn.lock ./
RUN npm install

# NOTE: see also .dockerignore
COPY . /slack-archive/

RUN npm run compile

VOLUME /slack-archive/slack-archive
ENTRYPOINT ["bin/slack-archive.js"]
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ can still enjoy in 20 years. This tool will help you do that.
npx slack-archive
```

Alternatively, to run a development version in Docker:
1. Checkout the code from Git
2. Make sure Docker is installed
3. Run `./run_in_docker.sh`

This will build Docker image called `slack-archive:dev`, compile it and start the interactive guide.
Results wil be saved in folder `slack-archive_USERDATA/`.

### Parameters

```
Expand Down
5 changes: 5 additions & 0 deletions run_in_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

mkdir -p slack-archive_USERDATA
docker build -t slack-archive:dev .
docker run --mount type=bind,source="$(pwd)"/slack-archive_USERDATA,target=/slack-archive/slack-archive -it slack-archive:dev