Initial commit

This commit is contained in:
Piv
2020-11-22 22:00:03 +10:30
commit 51be5206eb
5 changed files with 51 additions and 0 deletions

24
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,24 @@
image: vato.ddns.net:8083/docker
stages:
- build
- deploy
build:
stage: build
script:
- echo ${DOCKER_PASSWORD} | docker login vato.ddns.net:8083 --username ${DOCKER_USERNAME} --password-stdin
- docker build -t vato.ddns.net:8083/protoc:latest .
deploy:
stage: deploy
needs:
- build
script:
- docker rename vato.ddns.net:8083/protoc:latest vato.ddns.net:8083/protoc:${CI_COMMIT_BRANCH}
- echo ${DOCKER_PASSWORD} | docker login vato.ddns.net:8083 --username ${DOCKER_USERNAME} --password-stdin
- docker push vato.ddns.net:8083/protoc:latest
- docker push vato.ddns.net:8083/protoc:${CI_COMMIT_BRANCH}
only:
- tags

20
Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM vato.ddns.net:8083/alpine
ARG ARCH=x86_64
ARG PROTOC_VERSION=3.14.0
ARG GRPC_WEB_VERSION=1.2.1
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${ARCH}.zip -O protoc.zip && \
unzip protoc.zip -d /usr/ && \
chmod +x /usr/bin/protoc && \
rm protoc.zip /usr/readme.txt
RUN wget https://github.com/grpc/grpc-web/releases/download/${GRPC_WEB_VERSION}/protoc-gen-grpc-web-${GRPC_WEB_VERSION}-linux-${ARCH} && \
wget https://github.com/grpc/grpc-web/releases/download/${GRPC_WEB_VERSION}/protoc-gen-grpc-web-${GRPC_WEB_VERSION}-linux-${ARCH}.sha256 && \
cat protoc-gen-grpc-web-*.sha256 | sha256sum -c
RUN rm protoc-gen-grpc-web-*.sha256 && \
mv protoc-gen-grpc-web-* /usr/bin/protoc-gen-grpc-web && \
chmod +x /usr/bin/protoc-gen-grpc-web
COPY ./protoc-gen-* /usr/bin/

7
README.md Normal file
View File

@@ -0,0 +1,7 @@
# Protoc Docker
Docker container for generating protobuf code. Right now used in CI only for other projects.
## TODOS
- Build the swift plugins inside this repo, rather than committing the built plugins

BIN
protoc-gen-grpc-swift-linux Executable file

Binary file not shown.

BIN
protoc-gen-swift-linux Executable file

Binary file not shown.