-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDockerfile.python-base
40 lines (40 loc) · 1.88 KB
/
Dockerfile.python-base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM golang:1.15 AS builder
ARG BRANCH
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y ca-certificates openssh-client git curl make
RUN go get -u gopkg.in/yaml.v2
RUN go get -u golang.org/x/oauth2
RUN go get -u golang.org/x/text/transform
RUN go get -u golang.org/x/text/unicode/norm
RUN go get -u github.com/json-iterator/go
RUN go get -u github.com/LF-Engineering/dev-analytics-libraries/auth0
RUN go get -u github.com/LF-Engineering/dev-analytics-libraries/elastic
RUN go get -u github.com/LF-Engineering/dev-analytics-libraries/http
RUN go get -u github.com/LF-Engineering/dev-analytics-libraries/slack
RUN go get -u github.com/google/go-github/github
RUN go get -u github.com/PuerkitoBio/goquery
RUN go get -u github.com/avast/retry-go
RUN go get -u github.com/dgrijalva/jwt-go
RUN go get -u github.com/google/uuid
WORKDIR /go/src/github.com/LF-Engineering
RUN git clone https://github.com/LF-Engineering/da-ds
RUN git clone https://github.com/LF-Engineering/sync-data-sources
WORKDIR /go/src/github.com/LF-Engineering/da-ds
RUN CGO_ENABLED=0 go install -ldflags "-s -w -extldflags '-static' -X build.GitCommit=$(git rev-parse --verify HEAD)" github.com/LF-Engineering/da-ds/cmd/dads
WORKDIR /go/src/github.com/LF-Engineering/sync-data-sources/sources
RUN echo "Building for branch ${BRANCH}"
RUN git checkout -b ${BRANCH} "origin/${BRANCH}"
RUN git pull
RUN make -f ./Makefile dockerinstall
FROM python:3-slim
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y git cloc
COPY docker-images/.gitconfig /root/.gitconfig
COPY docker-images/scripts/*.sh /
COPY --from=builder /go/bin/syncdatasources /usr/bin/
COPY --from=builder /go/bin/dads /usr/bin/
COPY sources/data.zip /data.zip
# COPY sources/uuid.py /usr/bin/
# COPY sources/gitops.py /usr/bin/
COPY sources/detect-removed-commits.sh /usr/bin/
#COPY sources/sds.yaml /data/sds.txt
COPY docker-images/.vimrc /root/.vimrc
CMD /bin/bash