Skip to content
Snippets Groups Projects
Commit 2fe43093 authored by Andres Veidenberg's avatar Andres Veidenberg
Browse files

Update dockerfile

parent 638cd8db
No related branches found
No related tags found
No related merge requests found
Pipeline #48384 passed
data/*
\ No newline at end of file
FROM ubuntu:22.04
FROM python:3.9-slim
RUN apt-get update
RUN apt-get install -y python3
# Install system dependencies
RUN apt-get update && apt-get install -y \
libz-dev \
libffi-dev \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Set up non-root user and prepare directories
WORKDIR /app
RUN groupadd -g 568 apps \
&& useradd -m -d /app -s /bin/bash -u 568 -g 568 apps \
&& apt-get install -y python3-pip python3-dev python3-scipy python3-venv libz-dev libffi-dev
&& mkdir -p /data \
&& chown -R apps:apps /app /data
COPY requirements.txt .
RUN chown apps:apps requirements.txt
USER apps
ENV PATH=$PATH:/app/.local/bin
RUN python3 -m pip install wheel cython
RUN python3 -m pip install pheweb
RUN python3 -m pip install markupsafe==2.0.1
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Start the server
WORKDIR /data
EXPOSE 5000
CMD pheweb serve
\ No newline at end of file
CMD ["pheweb", "serve"]
\ No newline at end of file
version: '3'
services:
pheweb:
build:
context: .
dockerfile: Dockerfile
ports:
- "5000:5000"
volumes:
- ./data:/data
restart: unless-stopped
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment