Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM jekyll/jekyll:3.5.2

LABEL maintainer OBOFoundry<[email protected]>

ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools
COPY requirements.txt requirements.txt
RUN apk add python3-dev
RUN pip3 install --no-cache -r requirements.txt
#RUN pip3 install --no-cache --upgrade pip setuptools frontmatter

RUN mkdir -p /tools/
ENV PATH "/tools/apache-jena/bin:/tools/sparqlprog/bin:$PATH"
# Install Jena.
RUN wget -nv http://archive.apache.org/dist/jena/binaries/apache-jena-3.12.0.tar.gz -O- | tar xzC /tools && \
mv /tools/apache-jena-3.12.0 /tools/apache-jena

RUN apk --no-cache add openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community


CMD make all && jekyll serve
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,32 @@ jenkins-output.txt:

reports/%.csv: registry/ontologies.ttl sparql/%.sparql
arq --data $< --query sparql/$*.sparql --results csv > [email protected] && mv [email protected] $@

################################################
#### Commands for building the Docker image ####
################################################
VERSION = "0.0.1"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not very descriptive. Suggetion: OBOFOUNDRY_IMAGE_VERSION

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not review draft pull requests :P

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops I didn't look at the flag

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you'd hate working on one of my open source projects

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its like looking at someone six pack in progress under their t-shirt on January 10.

IM=obolibrary/site
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cryptic variable name

docker-build-no-cache:
@docker build --no-cache -t $(IM):$(VERSION) . \
&& docker tag $(IM):$(VERSION) $(IM):latest
docker-build:
@docker build -t $(IM):$(VERSION) . \
&& docker tag $(IM):$(VERSION) $(IM):latest
docker-build-use-cache-dev:
@docker build -t $(DEV):$(VERSION) . \
&& docker tag $(DEV):$(VERSION) $(DEV):latest
docker-clean:
docker kill $(IM) || echo not running ;
docker rm $(IM) || echo not made
docker-publish-no-build:
@docker push $(IM):$(VERSION) \
&& docker push $(IM):latest

docker-publish-dev-no-build:
@docker push $(DEV):$(VERSION) \
&& docker push $(DEV):latest

docker-publish: docker-build
@docker push $(IM):$(VERSION) \
&& docker push $(IM):latest
2 changes: 2 additions & 0 deletions docker_site.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
docker run -v $PWD/:/srv/jekyll/ -p 4000:4000 --rm -it obolibrary/site