Skip to content

Commit

Permalink
Merge pull request #372 from afuetterer/fix-docker-build
Browse files Browse the repository at this point in the history
Fix the Docker build
  • Loading branch information
huberrob authored Sep 5, 2023
2 parents a14b0d0 + a9fcefa commit 2dd6d4a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,20 @@ on:
- created

env:
DOCKER_BUILDKIT: 1
IMAGE_NAME: fuji

jobs:

build-and-publish:
# Build and push image to GitHub Container Registry https://docs.docker.com/docker-hub/builds/
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:

- run: docker --version
- run: docker buildx version

- uses: actions/checkout@v3

- name: Build image
Expand Down
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
FROM python:3
# syntax=docker/dockerfile:1.5
FROM python:3.8-slim

WORKDIR /usr/src/app

ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

### python:3 image: No java available: Cannot run TIKA...
### Install Java via the package manager
RUN apt-get update \
Expand All @@ -10,13 +17,9 @@ RUN apt-get update \
## OR: Use Ubuntu image with python and java pre-installed instead (smallest):
#FROM korekontrol/ubuntu-java-python3:latest

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY pyproject.toml ./
COPY /fuji_server ./fuji_server

RUN pip3 install --no-cache-dir .
COPY README.md pyproject.toml ./
COPY fuji_server ./fuji_server
RUN pip install --no-cache-dir .

# Docker doesn't like 'localhost'
RUN sed -i "s|localhost|0.0.0.0 |g" ./fuji_server/config/server.ini
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ dependencies = [
"idutils~=1.1.5",
"jmespath~=0.10.0",
"levenshtein~=0.12.0",
"lxml~=4.7.1",
"lxml~=4.7",
"markupsafe~=2.0.1",
"pandas~=1.3.5",
"pandas~=1.3",
"pyRdfa3~=3.5.3",
"pyld~=2.0.3",
"pyyaml!=6.0.0,!=5.4.0,!=5.4.1",
Expand All @@ -46,8 +46,7 @@ dependencies = [
"werkzeug~=1.0"
]
description = "FUJI (FAIRsFAIR Data Objects Assessment Service), A service to evaluate FAIR data objects based on FAIRsFAIR Metrics"
# TODO: figure out why the README causes failure of building the docker container
# readme = "README.md"
readme = "README.md"
keywords = [
"PANGAEA",
"FAIRsFAIR",
Expand Down

0 comments on commit 2dd6d4a

Please sign in to comment.