Add Dockerfile (#185)
* Add Dockerfile * Add .dockerignore * Publish to docker hub on every releasepull/191/head
parent
48e0167060
commit
5077b1a87a
|
@ -0,0 +1,9 @@
|
||||||
|
.DS_Store
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
.git/
|
||||||
|
tests/
|
||||||
|
fixtures/
|
||||||
|
coverage/
|
||||||
|
coverage.xml
|
||||||
|
images/
|
|
@ -3,6 +3,9 @@ language: php
|
||||||
php:
|
php:
|
||||||
- '7.0'
|
- '7.0'
|
||||||
|
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- vendor
|
- vendor
|
||||||
|
@ -16,3 +19,9 @@ script:
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
|
- |
|
||||||
|
if [[ $TRAVIS_TAG == v* ]]; then
|
||||||
|
docker build -t felixfbecker/php-language-server:${TRAVIS_TAG:1} .
|
||||||
|
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
||||||
|
docker push felixfbecker/php-language-server:${TRAVIS_TAG:1}
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
|
||||||
|
# Running this container will start a language server that listens for TCP connections on port 2088
|
||||||
|
# Every connection will be run in a forked child process
|
||||||
|
|
||||||
|
# Please note that before building the image, you have to install dependencies with `composer install`
|
||||||
|
|
||||||
|
FROM php:7-cli
|
||||||
|
MAINTAINER Felix Becker <felix.b@outlook.com>
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
# Needed for CodeSniffer
|
||||||
|
&& apt-get install -y libxml2 libxml2-dev \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN docker-php-ext-configure pcntl --enable-pcntl
|
||||||
|
RUN docker-php-ext-install pcntl
|
||||||
|
COPY ./php.ini /usr/local/etc/php/conf.d/
|
||||||
|
|
||||||
|
COPY ./ /srv/phpls
|
||||||
|
|
||||||
|
WORKDIR /srv/phpls
|
||||||
|
|
||||||
|
EXPOSE 2088
|
||||||
|
|
||||||
|
CMD ["--tcp-server=0:2088"]
|
||||||
|
|
||||||
|
ENTRYPOINT ["php", "bin/php-language-server.php"]
|
Loading…
Reference in New Issue