Skip to content

Commit

Permalink
Merge pull request #855 from openzim/ISNIT0/docker-build
Browse files Browse the repository at this point in the history
🐳 fixing docker build to use committed code
  • Loading branch information
kelson42 authored Jul 1, 2019
2 parents dfc9842 + 1188a73 commit b9e0fb2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
cac
out
test
.vscode
.github
22 changes: 15 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
FROM node:10

# Basics
RUN apt update && apt install -y --no-install-recommends make g++ curl git
# Install dependences
RUN apt update && apt install -y --no-install-recommends make g++ curl git imagemagick

# Install mwoffliner
RUN apt install -y --no-install-recommends imagemagick
WORKDIR /tmp/mwoffliner
COPY package*.json ./
COPY src src
COPY lib lib
COPY res res
COPY translation translation
COPY index.js .
COPY build.sh .
RUN npm --global config set user root
RUN npm install -g mwoffliner@1.9.3
RUN apt remove -y make g++
RUN npm i
RUN npm i -g .

# Boot commands
# Configure launch environment
WORKDIR /
RUN mv /root/.bashrc /root/.old-bashrc
COPY .custom-bashrc /root/.bashrc
COPY docker/.custom-bashrc /root/.bashrc
CMD mwoffliner
9 changes: 8 additions & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'''MWoffliner Docker image''' allows to quickly benefit of MWoffliner
without having to install all dependencies. You just need a working
Docker (http://www.docker.com).
[Docker](https://www.docker.com).

## Standalone

Expand Down Expand Up @@ -34,3 +34,10 @@ This allows to run both, Redis & MWoffliner, containers simultaneously:
```
docker-compose --file docker-compose.yml run mwoffliner
```

## Build the Docker image

Run from the repository root:
```
docker build . -f docker/Dockerfile -t openzim/mwoffliner
```

0 comments on commit b9e0fb2

Please sign in to comment.