-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (30 loc) · 1.17 KB
/
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
35
36
37
38
FROM fluxrm/flux-sched:jammy
USER root
ENV DEBIAN_FRONTEND=noninteractive
ENV GO_VERSION=1.22.6
RUN apt-get update && apt-get clean -y && apt -y autoremove
# Install go
RUN wget https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz && tar -xvf go${GO_VERSION}.linux-amd64.tar.gz && \
mv go /usr/local && rm go${GO_VERSION}.linux-amd64.tar.gz
# ENV GOROOT=/usr/local/go
# ENV GOPATH=/go
ENV PATH=/usr/local/go/bin:$PATH
RUN flux keygen
RUN git clone https://github.com/flux-framework/flux-sched.git /opt/flux-sched
# Go dependencies for protobuf
RUN apt -y update && apt -y upgrade && apt install --no-install-recommends -y protobuf-compiler curl && \
go install google.golang.org/protobuf/cmd/[email protected] && \
go install google.golang.org/grpc/cmd/[email protected]
# These need to be on the LD_LIBRARY_PATH for the server to find at runtime
ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib/flux
WORKDIR /code
COPY . /code
RUN go mod tidy && \
go mod vendor && \
make server FLUX_SCHED_ROOT=/opt/flux-sched && \
mkdir -p /home/data/jobspecs /home/data/jgf && \
chmod -R ugo+rwx /home/data
RUN make server
EXPOSE 51003
EXPOSE 4242
ENTRYPOINT ["/code/bin/server"]