Skip to content

Commit

Permalink
add a Dockerfile to debug issues/239
Browse files Browse the repository at this point in the history
  • Loading branch information
pierreaubert committed Jul 4, 2023
1 parent 0a6609a commit 67b9b01
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
docs
bin
build
.vscode
.cache
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM ubuntu:22.04 as base

LABEL org.opencontainers.image.authors="pierre@spinorama.org"
LABEL version="0.1"

RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked --mount=type=cache,target=/var/lib/apt,sharing=locked \
apt update && \
apt-get --no-install-recommends install -y ca-certificates curl gnupg python3 python3-pip imagemagick keychain npm wget libc-bin locales python3.10-venv && \
locale-gen en_US.UTF-8

WORKDIR /usr/src/spinorama

COPY . .

RUN /usr/bin/python3.10 -m venv .venv
RUN . .venv/bin/activate
RUN pip3 install -U -r ./requirements.txt && \
pip3 install -U -r ./requirements-test.txt && \
pip3 install -U -r ./requirements-dev.txt && \
pip3 install -U -r ./requirements-api.txt

RUN npm install --production

# FROM ubuntu:22.04 AS final

ENV PYTHONPATH=/usr/src/spinorama/src:/usr/src/spinorama/src/website

CMD pytest tests

EXPOSE 443

0 comments on commit 67b9b01

Please sign in to comment.