-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
dev-env.Dockerfile
34 lines (21 loc) · 1.02 KB
/
dev-env.Dockerfile
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
FROM golang:1.18.2-alpine3.15 AS build-gcsfuse
ARG gcsfuse_version
RUN apk add --update --no-cache fuse fuse-dev git
WORKDIR ${GOPATH}/src/github.com/googlecloudplatform/gcsfuse
# Create Tmp Bin Dir
RUN mkdir /tmp/bin
# Install gcsfuse using the specified version or commit hash
RUN git clone https://github.com/googlecloudplatform/gcsfuse . && git checkout "v${gcsfuse_version}"
RUN go install ./tools/build_gcsfuse
RUN mkdir /tmp/gcsfuse
RUN build_gcsfuse . /tmp/gcsfuse ${gcsfuse_version} -ldflags "-X main.gcsfuseVersion=${gcsfuse_version}"
FROM golang:1.18.2-alpine3.15
RUN apk add --update --no-cache fuse fuse-dev git python3 python3-dev py3-pip bash build-base docker
COPY --from=build-gcsfuse /tmp/gcsfuse/bin/* /usr/local/bin/
COPY --from=build-gcsfuse /tmp/gcsfuse/sbin/* /sbin/
RUN python3 -m pip install --upgrade pip setuptools
RUN mkdir /driver
WORKDIR /driver
COPY requirements.txt /tmp/requirements.txt
RUN python3 -m pip install --upgrade --ignore-installed -r /tmp/requirements.txt
RUN rm /tmp/requirements.txt