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

Adds a Dockerfile and updates the README file #23

Open
wants to merge 1 commit into
base: master
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
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:alpine3.16

RUN apk add git

WORKDIR /app
COPY . .
RUN npm install && \
npm audit fix --force && \
npm install -g .

ENTRYPOINT [ "ttf2woff" ]
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ttf2woff
========
# ttf2woff

ttf2woff converts TTF fonts to WOFF format. That can be useful for different
webfont generation tools.
Expand All @@ -8,30 +7,41 @@ This is node.js partial port of original woff CLI tools
http://people.mozilla.com/~jkew/woff/


Usage
-----
## Usage

Install:
### Install globally

``` bash
npm install -g ttf2woff
```

Usage example:
### Usage example

``` bash
ttf2woff fontello.ttf fontello.woff
```

### Run in Docker

Authors
-------
As an alternative, the app can be run through Docker. First, the container image needs to be built, for instance:

````bash
$ docker build -t fontello/ttf2woff -f Dockerfile .
````

Now, the `ttf2woff` application can be run within a temporary Docker container with a mounted volume (to exchange the font files between the container and the host machine).

````bash
$ docker run --rm -v $(pwd)/fixtures/:/fonts fontello/ttf2woff /fonts/test.ttf /fonts/converted.woff
````


## Authors

* Viktor Semykin <[email protected]>


License
-------
## License

Copyright (c) 2013 [Vitaly Puzrin](https://github.com/puzrin).
Released under the MIT license. See
Expand Down