api: add --depth=1 to googleapis and protobuf clones (#420)

This commit is contained in:
Sajad Abdollahi 2024-05-07 14:51:14 +03:30 committed by GitHub
parent 40cfa3ddf2
commit 26832f3a5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@ FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
ENV PROJECT_PATH=/chirpstack/api ENV PROJECT_PATH=/chirpstack/api
RUN apt update && apt install -y make git RUN apt update && apt install -y make git
RUN git clone --depth=1 --branch=master https://github.com/googleapis/googleapis.git /googleapis RUN git clone --depth=1 https://github.com/googleapis/googleapis.git /googleapis
RUN mkdir -p /googleproto/google/api/ RUN mkdir -p /googleproto/google/api/
RUN mv /googleapis/google/api/http.proto /googleproto/google/api/ && mv /googleapis/google/api/annotations.proto /googleproto/google/api/ RUN mv /googleapis/google/api/http.proto /googleproto/google/api/ && mv /googleapis/google/api/annotations.proto /googleproto/google/api/
RUN rm -rf /googleapis RUN rm -rf /googleapis

2
api/Dockerfile-md vendored
View File

@ -3,7 +3,7 @@ FROM golang:1.19.3-alpine
ENV PROJECT_PATH=/chirpstack/api ENV PROJECT_PATH=/chirpstack/api
RUN apk add --no-cache make git bash protobuf protobuf-dev RUN apk add --no-cache make git bash protobuf protobuf-dev
RUN git clone https://github.com/googleapis/googleapis.git /googleapis RUN git clone --depth=1 https://github.com/googleapis/googleapis.git /googleapis
RUN mkdir -p $PROJECT_PATH RUN mkdir -p $PROJECT_PATH
WORKDIR $PROJECT_PATH WORKDIR $PROJECT_PATH

View File

@ -2,8 +2,8 @@ FROM python:3.11.0
ENV PROJECT_PATH=/chirpstack/api ENV PROJECT_PATH=/chirpstack/api
RUN git clone https://github.com/protocolbuffers/protobuf.git /protobuf RUN git clone --depth=1 https://github.com/protocolbuffers/protobuf.git /protobuf
RUN git clone https://github.com/googleapis/googleapis.git /googleapis RUN git clone --depth=1 https://github.com/googleapis/googleapis.git /googleapis
RUN mkdir -p PROJECT_PATH RUN mkdir -p PROJECT_PATH
WORKDIR $PROJECT_PATH WORKDIR $PROJECT_PATH