Skip to content

Commit

Permalink
Add Dockerfile to run oncall in a container
Browse files Browse the repository at this point in the history
  • Loading branch information
ahm3djafri committed Sep 20, 2018
1 parent b40c938 commit 189a72f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ubuntu:16.04 as base

RUN apt-get update
RUN apt-get -y install libffi-dev libsasl2-dev python-dev libldap2-dev libssl-dev python-pip python-setuptools mysql-client

FROM base as envbase

COPY setup.py /oncall/setup.py
COPY src/oncall/__init__.py /oncall/src/oncall/__init__.py

WORKDIR /oncall

RUN python setup.py develop
RUN pip install -e '.[dev]'

FROM envbase

COPY . /oncall
WORKDIR /oncall

EXPOSE 8080

ENTRYPOINT [ "oncall-dev", "./configs/config.yaml" ]
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ check:
make test

.PHONY: test e2e

APP_NAME=oncall

build:
docker build --ulimit nofile=1024 -t $(APP_NAME) .

run: build
docker run -p 8080:8080 $(APP_NAME)

0 comments on commit 189a72f

Please sign in to comment.