add dockerfile for creating conan server image
This commit is contained in:
parent
de97de9732
commit
5301123508
|
@ -0,0 +1,27 @@
|
|||
FROM python:alpine
|
||||
MAINTAINER Jakub Sokołowski <jakub@status.im>
|
||||
|
||||
ENV CONAN_PORT 9300
|
||||
ENV CONAN_WORKERS 4
|
||||
ENV CONAN_TIMEOUT 300
|
||||
|
||||
ARG CONAN_VERSION
|
||||
ARG GUNICORN_VERSION
|
||||
|
||||
# Install dependencies so they get cached with the image
|
||||
VOLUME /var/lib/conan
|
||||
RUN apk update && \
|
||||
apk add musl-dev gcc && \
|
||||
pip install --no-cache-dir \
|
||||
conan==${CONAN_VERSION} \
|
||||
gunicorn==${GUNICORN_VERSION}
|
||||
|
||||
# Run uwsgi listening on port 9300
|
||||
EXPOSE ${CONAN_PORT}
|
||||
|
||||
LABEL source="https://github.com/status-im/infra-utils"
|
||||
LABEL description="Conan server repository service"
|
||||
LABEL maintainer="jakub@status.im"
|
||||
|
||||
COPY ./entrypoint.sh /entrypoint.sh
|
||||
CMD ["/bin/sh", "/entrypoint.sh"]
|
|
@ -0,0 +1,14 @@
|
|||
CONAN_VERSION = 1.9.0
|
||||
GUNICORN_VERSION = 19.9.0
|
||||
|
||||
IMAGE_TAG = latest
|
||||
IMAGE_NAME = statusteam/conan:$(IMAGE_TAG)
|
||||
|
||||
build:
|
||||
docker build \
|
||||
--build-arg="CONAN_VERSION=$(CONAN_VERSION)" \
|
||||
--build-arg="GUNICORN_VERSION=$(GUNICORN_VERSION)" \
|
||||
-t $(IMAGE_NAME) .
|
||||
|
||||
push: build
|
||||
docker push $(IMAGE_NAME)
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env sh
|
||||
gunicorn \
|
||||
--bind=0.0.0.0:${CONAN_PORT} \
|
||||
--workers=${CONAN_WORKERS} \
|
||||
--timeout=${CONAN_TIMEOUT} \
|
||||
conans.server.server_launcher:app
|
Loading…
Reference in New Issue