Initial commit
This commit is contained in:
commit
09decd3201
2 changed files with 27 additions and 0 deletions
14
.gitlab-ci.yml
Normal file
14
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
build:signal-server:
|
||||||
|
tags:
|
||||||
|
- docker-builder
|
||||||
|
image: docker:latest
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
|
||||||
|
- docker build -t ${CI_REGISTRY_IMAGE}/signal-server:${CI_COMMIT_SHA:0:8} .
|
||||||
|
- export VERSION=$(docker run ${CI_REGISTRY_IMAGE}/signal-server:${CI_COMMIT_SHA:0:8} -v)
|
||||||
|
- docker tag ${CI_REGISTRY_IMAGE}/signal-server:${CI_COMMIT_SHA:0:8} ${CI_REGISTRY_IMAGE}/signal-server:${CI_COMMIT_REF_SLUG}
|
||||||
|
- docker tag ${CI_REGISTRY_IMAGE}/signal-server:${CI_COMMIT_SHA:0:8} ${CI_REGISTRY_IMAGE}/signal-server:${VERSION}
|
||||||
|
- docker push ${CI_REGISTRY_IMAGE}/signal-server:${CI_COMMIT_SHA:0:8}
|
||||||
|
- docker push ${CI_REGISTRY_IMAGE}/signal-server:${CI_COMMIT_REF_SLUG}
|
||||||
|
- docker push ${CI_REGISTRY_IMAGE}/signal-server:${VERSION}
|
13
signal-server.Dockerfile
Normal file
13
signal-server.Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
FROM debian:9 as build
|
||||||
|
RUN apt-get update && apt-get install -y openjdk-8-jdk-headless maven git
|
||||||
|
RUN git -C /usr/local/src clone https://github.com/signalapp/Signal-Server
|
||||||
|
WORKDIR /usr/local/src/Signal-Server
|
||||||
|
RUN mvn install -DskipTests
|
||||||
|
RUN ls -lha target
|
||||||
|
|
||||||
|
FROM debian:9
|
||||||
|
RUN apt-get update && apt-get install -y openjdk-8-jre-headless
|
||||||
|
COPY --from=build /usr/local/src/Signal-Server/target/TextSecureServer-2.02.jar /usr/share/TextSecureServer.jar
|
||||||
|
RUN useradd signal
|
||||||
|
RUN chown -R signal /usr/share/TextSecureServer.jar
|
||||||
|
ENTRYPOINT ["java", "-jar", "/usr/share/TextSecureServer.jar"]
|
Loading…
Reference in a new issue