Skip to content

Commit

Permalink
Update Dockerfile to use Python 3.9 (#334)
Browse files Browse the repository at this point in the history
* Update Dockerfile and add compose file.

* Update Dockerfile comment.

* Updated README.

---------

Co-authored-by: Connor <>
Co-authored-by: Jessica Tegner <jessica.tegner@outlook.com>
  • Loading branch information
DisSupEng and JessicaTegner authored Aug 31, 2023
1 parent 08c3bdc commit df67c94
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
25 changes: 15 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
# --------------------------------------------------------------------------
# This is a Dockerfile to build an Ubuntu 14.04 Docker image with pypandoc
# and pandoc
# This is a Dockerfile to build an Debian 11 (bullseye) image with pypandoc
# and pandoc, uses Python 3.9.
#
# Use a command like:
# docker build -t <user>/pypandoc .
# --------------------------------------------------------------------------

FROM orchardup/python:2.7
MAINTAINER Marc Abramowitz <marc@marc-abramowitz.com> (@msabramo)
# Use Python 3.9
FROM python:3.9
# Not sure if this line needs updating, I think this person no longer works on the project?
LABEL author Marc Abramowitz <marc@marc-abramowitz.com>
# Update apt packages and install pandoc
RUN apt update && apt upgrade -y && apt install pandoc -y
# Update pip
RUN pip install --upgrade pip

ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL C

RUN apt-get update && apt-get install -y pandoc ipython
ADD . pypandoc
# Copy the files to container
COPY . pypandoc
WORKDIR pypandoc
RUN python setup.py install

# Use pip to install the local version of pypandoc using pyproject.toml
RUN pip install .

RUN mkdir -p /source
WORKDIR /source
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ Note that for citeproc tests to pass you'll need to have [pandoc-citeproc](https
* [Jesse Widner](https://github.com/jwidner) & [Dominic Thorn](https://github.com/domvwt) - Add support for lua filters
* [Alex Kneisel](https://github.com/hey-thanks/) - Added pathlib.Path support to convert_file.
* [Juho Vepsäläinen](https://github.com/bebraw/) - Creator and former maintainer of pypandoc

* [Connor](https://github.com/DisSupEng/) - Updated Dockerfile to Python 3.9 image and added docker compose file

## License

Expand Down
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
app:
image: pypandoc
container_name: pypan_container
build: .
restart: always
volumes:
# Create a binding mount between the source directory on the host and the container's source code directory.
# This means that any updated code will be transfered to the running container
- .:/pypandoc/
# This is just to keep the container running. It will allow us to use docker compose exec to go inside the container.
command: tail -F ./anything

0 comments on commit df67c94

Please sign in to comment.