diff --git a/pycar/.dockerignore b/pycar/.dockerignore index 6cb7243..74b787a 100644 --- a/pycar/.dockerignore +++ b/pycar/.dockerignore @@ -1,8 +1,6 @@ **/*.jpg **/*.png tests -MotorControl -Messaging Web **/*.mdj **/*.pdf \ No newline at end of file diff --git a/pycar/.gitlab-ci.yml b/pycar/.gitlab-ci.yml new file mode 100644 index 0000000..40265cd --- /dev/null +++ b/pycar/.gitlab-ci.yml @@ -0,0 +1,7 @@ +image: docker + +build: + stage: build + script: + - cd pycar + - docker build -f pycar/Dockerfile --build-arg PYPI_USERNAME=${PYPI_USERNAME} --build-arg PYPI_PASSWORD=${PYPI_PASSWORD} pycar \ No newline at end of file diff --git a/pycar/Dockerfile b/pycar/Dockerfile index 8c3f206..151fc03 100644 --- a/pycar/Dockerfile +++ b/pycar/Dockerfile @@ -1,10 +1,7 @@ FROM vato.ddns.net:8083/python:3 -ARG PYPI_USERNAME -ARG PYPI_PASSWORD - RUN apt-get update -# OpenCV has a LOT of dependencies. +# OpenCV dependencies. RUN apt-get install -y \ libglib2.0-0 \ libsm6 \ @@ -19,6 +16,10 @@ RUN apt-get install -y \ libpq-dev \ && rm -rf /var/lib/apt/lists/* + +ARG PYPI_USERNAME +ARG PYPI_PASSWORD + COPY requirements.txt / RUN pip install --index-url https://${PYPI_USERNAME}:${PYPI_PASSWORD}@vato.ddns.net/nexus/repository/pypi-grouped/simple -r requirements.txt @@ -33,4 +34,4 @@ ENV CAR_LIDAR=LIDAR_MOCK # EXPOSE 1883 ENV PYTHONPATH=/app -CMD ["python", "-m", "car"] \ No newline at end of file +ENTRYPOINT ["python", "-m", "car"] \ No newline at end of file