-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile_dev
More file actions
41 lines (33 loc) · 1.1 KB
/
Dockerfile_dev
File metadata and controls
41 lines (33 loc) · 1.1 KB
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
41
# Copyright 2019 Hammerspace
# Dev Image
# Convenience image for testing the plugin
# The local source code directory should be mapped to "/hammerspace-csi-plugin/"
# via a docker volume (docker run -v /source-code/:/hammerspace-csi-plugin/
# Example usage:
# docker build -t csi-dev:latest -f Dockerfile_dev .
# docker compose -f docker-compose-dev.yml up
# ---------- Stage 1: Builder ----------
FROM golang:1.24-alpine AS builder
# Install required packages
RUN apk add --no-cache \
git \
make \
gcc \
musl-dev \
nfs-utils \
qemu-img \
xfsprogs \
e2fsprogs \
zfs \
btrfs-progs \
py3-pip
# Use pip3 (not deprecated pip) to install hstk globally
RUN python3 -m venv /tmp/venv \
&& /tmp/venv/bin/pip install --no-cache-dir hstk \
&& ln -s /tmp/venv/bin/hstk /usr/local/bin/hstk
# Clone and build gocsi tool (specific branch v1.2.2)
RUN git clone --depth 1 --branch v1.2.2 https://github.com/rexray/gocsi /go/src/github.com/rexray/gocsi
WORKDIR /go/src/github.com/rexray/gocsi
RUN make all
# Set working directory inside container for your plugin source
WORKDIR /csi-plugin/