Skip to content

Commit

Permalink
Fixes some issues when starting up the docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
HazardDede committed Feb 6, 2018
1 parent d402df6 commit b5411db
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ RUN mkdir -p ${WORKDIR} && \
# Install rest-api wrapper for rpi-rf
COPY . ${WORKDIR}
RUN pip3 install -r ${WORKDIR}/requirements.txt
# Setting correct entrypoint
ENV FLASK_APP ${WORKDIR}/rpi433rc/app.py

# Re-copy the entrypoint.sh to the root
COPY ./entrypoint.sh /entrypoint.sh
Expand Down
3 changes: 2 additions & 1 deletion Makefile.docker
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ shell: build
run: build
docker run --rm \
--name $(CONTAINER_NAME) \
-p "5555:5000" \
--privileged --cap-add SYS_RAWIO --device=/dev/mem \
$(RELEASE_IMAGE_NAME):$(CURRENT_TAG)
$(RELEASE_IMAGE_NAME):$(CURRENT_TAG) serve

sniff: build
docker run --rm -it \
Expand Down
3 changes: 1 addition & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ case ${1} in
exec rpi-rf_receive "$@"
;;
serve)
echo "Serving via rest-api is not implemented"
exec ${WORKDIR}/run.sh
exec flask run --host=0.0.0.0
;;
*)
exec "$@"
Expand Down
3 changes: 2 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
attrs
flask
flask-restplus
schema
rpi-rf
rpi-rf
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@
#
# pip-compile --output-file requirements.txt requirements.in
#
--extra-index-url https://www.piwheels.hostedpi.com/simple

aniso8601==2.0.0 # via flask-restplus
attrs==17.4.0
click==6.7 # via flask
flask-restplus==0.10.1
flask==0.12.2
itsdangerous==0.24 # via flask
jinja2==2.10 # via flask
jsonschema==2.6.0 # via flask-restplus
markupsafe==1.0 # via jinja2
pytz==2017.3 # via flask-restplus
rpi-rf==0.9.6
rpi.gpio==0.6.3 # via rpi-rf
schema==0.6.7
six==1.11.0 # via flask-restplus
werkzeug==0.14.1 # via flask

0 comments on commit b5411db

Please sign in to comment.