2022-04-02 17:09:06 +01:00
|
|
|
FROM alpine:3.15 as intermediate
|
2022-03-29 10:14:59 +01:00
|
|
|
|
|
|
|
RUN mkdir /src
|
|
|
|
WORKDIR /src
|
|
|
|
|
|
|
|
# Install the build tools
|
|
|
|
RUN apk add git go make
|
|
|
|
|
2022-04-02 17:09:06 +01:00
|
|
|
# Fetch the Nebula source
|
2022-03-29 10:14:59 +01:00
|
|
|
RUN git clone https://github.com/slackhq/nebula.git
|
|
|
|
|
2022-04-02 17:09:06 +01:00
|
|
|
# Compile the Nebula GNU/Linux binaries for all platforms
|
2022-03-29 10:14:59 +01:00
|
|
|
WORKDIR /src/nebula
|
2022-04-02 17:09:06 +01:00
|
|
|
RUN make bin
|
|
|
|
|
|
|
|
RUN go get github.com/chrislusf/seaweedfs/weed
|
2022-03-29 10:14:59 +01:00
|
|
|
|
|
|
|
# Start from a clean image
|
2022-04-02 17:09:06 +01:00
|
|
|
FROM alpine:3.15
|
2022-03-29 10:14:59 +01:00
|
|
|
|
2022-04-05 09:12:49 +01:00
|
|
|
# Install some required tools
|
|
|
|
RUN apk add fuse
|
|
|
|
|
2022-03-29 10:14:59 +01:00
|
|
|
RUN mkdir /app
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
# Copy over the compiled binaries
|
2022-04-02 17:09:06 +01:00
|
|
|
COPY --from=intermediate /src/nebula/nebula ./
|
|
|
|
COPY --from=intermediate /src/nebula/nebula-cert ./
|
|
|
|
COPY --from=intermediate /root/go/bin/weed ./
|
2022-03-29 10:14:59 +01:00
|
|
|
|
2022-04-02 17:09:06 +01:00
|
|
|
COPY nebula-start.sh ./
|
|
|
|
COPY seaweedfs-start.sh ./
|
|
|
|
COPY docker-entrypoint.sh ./entrypoint.sh
|
2022-03-29 18:37:47 +01:00
|
|
|
|
|
|
|
EXPOSE 4242/udp
|
2022-04-02 17:09:06 +01:00
|
|
|
EXPOSE 9333/tcp
|
|
|
|
EXPOSE 8080/tcp
|
2022-03-29 10:14:59 +01:00
|
|
|
ENTRYPOINT [ "/bin/sh", "/app/entrypoint.sh" ]
|