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

Add Containerfile #397

Merged
merged 2 commits into from
Nov 13, 2023
Merged
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
22 changes: 22 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish container

on:
workflow_run:
workflows: [test]
types:
- completed
branches:
- master

jobs:
publish_container:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- run: podman login -u ${{ github.repository_owner }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
- run: podman build -t ghcr.io/${{ github.repository }} .
- run: podman push ghcr.io/${{ github.repository }}
7 changes: 7 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM docker.io/python
RUN apt update && apt install -y lbzip2
COPY pyproject.toml README.md LICENSE .
COPY src src
RUN python -m pip install -U pip
RUN python -m pip install --use-pep517 .
ENTRYPOINT ["wiktwords"]
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,18 @@ word `thrill` as an English verb (only one part-of-speech is shown here):

### Installing

Preparation: on Linux (example from Ubuntu 20.04), you may need to
#### Use container:

```
$ podman run -it --rm ghcr.io/tatuylonen/wiktextract --help
```

#### Install from source:

On Linux (example from Ubuntu 20.04), you may need to
first install the `build-essential` and `python3-dev` packages
with `apt update && apt install build-essential python3-dev python3-pip lbzip2`.

Install `wiktextract` from source:

```
git clone https://github.com/tatuylonen/wiktextract.git
cd wiktextract
Expand All @@ -316,12 +322,6 @@ python -m pip install -U pip
python -m pip install --use-pep517 .
```

Alternatively, you can install the package from pypi.org:

```
python -m pip install wiktextract
```

This software requires Python 3.

### Running tests
Expand Down