infranet/Dockerfile

45 lines
968 B
Docker
Raw Normal View History

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 install github.com/chrislusf/seaweedfs/weed@latest
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
2022-04-06 08:30:25 +01:00
RUN apk add fuse go jq
# RUN go install github.com/square/certstrap@latest
# ENV PATH=$PATH:/root/go/bin
2022-04-05 09:12:49 +01:00
2022-03-29 10:14:59 +01:00
RUN mkdir /app
WORKDIR /app
# Copy over the compiled binaries
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
COPY nebula-start.sh .
COPY seaweedfs-start.sh .
2022-04-02 17:09:06 +01:00
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
EXPOSE 18080/tcp
EXPOSE 8888/tcp
EXPOSE 18888/tcp
2022-03-29 10:14:59 +01:00
ENTRYPOINT [ "/bin/sh", "/app/entrypoint.sh" ]