Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dockerfiles for building docker images #2516

Merged
merged 3 commits into from
Aug 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
ASAN_OPTIONS: fast_unwind_on_malloc=1
run: ctest -j $(($(nproc)/2+1)) --timeout 400 --output-on-failure
working-directory: build/
timeout-minutes: 40
timeout-minutes: 20
- name: Pytest
run: |
make up
Expand Down
25 changes: 20 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,25 @@ COPY . /home/nebula/BUILD
RUN cd /home/nebula/BUILD/package \
&& ./package.sh -v $(git rev-parse --short HEAD) -n OFF -b ${BRANCH}

FROM centos:7 as graphd

COPY --from=builder /home/nebula/BUILD/pkg-build/cpack_output/nebula-*-common.rpm /usr/local/nebula/nebula-common.rpm
COPY --from=builder /home/nebula/BUILD/pkg-build/cpack_output/nebula-*-graph.rpm /usr/local/nebula/nebula-graphd.rpm

WORKDIR /usr/local/nebula

RUN rpm -ivh *.rpm \
&& mkdir -p ./{logs,data,pids} \
&& rm -rf *.rpm

EXPOSE 9669 19669 19670

ENTRYPOINT ["/usr/local/nebula/bin/nebula-graphd", "--flagfile=/usr/local/nebula/etc/nebula-graphd.conf", "--daemonize=false"]

FROM centos:7 as metad

COPY --from=builder /home/nebula/BUILD/build/cpack_output/nebula-*-common.rpm /usr/local/nebula/nebula-common.rpm
COPY --from=builder /home/nebula/BUILD/build/cpack_output/nebula-*-meta.rpm /usr/local/nebula/nebula-metad.rpm
COPY --from=builder /home/nebula/BUILD/pkg-build/cpack_output/nebula-*-common.rpm /usr/local/nebula/nebula-common.rpm
COPY --from=builder /home/nebula/BUILD/pkg-build/cpack_output/nebula-*-meta.rpm /usr/local/nebula/nebula-metad.rpm

WORKDIR /usr/local/nebula

Expand All @@ -24,8 +39,8 @@ ENTRYPOINT ["/usr/local/nebula/bin/nebula-metad", "--flagfile=/usr/local/nebula/

FROM centos:7 as storaged

COPY --from=builder /home/nebula/BUILD/build/cpack_output/nebula-*-common.rpm /usr/local/nebula/nebula-common.rpm
COPY --from=builder /home/nebula/BUILD/build/cpack_output/nebula-*-storage.rpm /usr/local/nebula/nebula-storaged.rpm
COPY --from=builder /home/nebula/BUILD/pkg-build/cpack_output/nebula-*-common.rpm /usr/local/nebula/nebula-common.rpm
COPY --from=builder /home/nebula/BUILD/pkg-build/cpack_output/nebula-*-storage.rpm /usr/local/nebula/nebula-storaged.rpm

WORKDIR /usr/local/nebula

Expand All @@ -39,7 +54,7 @@ ENTRYPOINT ["/usr/local/nebula/bin/nebula-storaged", "--flagfile=/usr/local/nebu

FROM centos:7 as tools

COPY --from=builder /home/nebula/BUILD/build/cpack_output/nebula-*-tool.rpm /usr/local/nebula/nebula-tool.rpm
COPY --from=builder /home/nebula/BUILD/pkg-build/cpack_output/nebula-*-tool.rpm /usr/local/nebula/nebula-tool.rpm

WORKDIR /usr/local/nebula

Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.metad
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ RUN cd /home/nebula/BUILD/package \

FROM centos:7

COPY --from=builder /home/nebula/BUILD/build/cpack_output/nebula-*-common.rpm /usr/local/nebula/nebula-common.rpm
COPY --from=builder /home/nebula/BUILD/build/cpack_output/nebula-*-meta.rpm /usr/local/nebula/nebula-metad.rpm
COPY --from=builder /home/nebula/BUILD/pkg-build/cpack_output/nebula-*-common.rpm /usr/local/nebula/nebula-common.rpm
COPY --from=builder /home/nebula/BUILD/pkg-build/cpack_output/nebula-*-meta.rpm /usr/local/nebula/nebula-metad.rpm

WORKDIR /usr/local/nebula

Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.storaged
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ RUN cd /home/nebula/BUILD/package \

FROM centos:7

COPY --from=builder /home/nebula/BUILD/build/cpack_output/nebula-*-common.rpm /usr/local/nebula/nebula-common.rpm
COPY --from=builder /home/nebula/BUILD/build/cpack_output/nebula-*-storage.rpm /usr/local/nebula/nebula-storaged.rpm
COPY --from=builder /home/nebula/BUILD/pkg-build/cpack_output/nebula-*-common.rpm /usr/local/nebula/nebula-common.rpm
COPY --from=builder /home/nebula/BUILD/pkg-build/cpack_output/nebula-*-storage.rpm /usr/local/nebula/nebula-storaged.rpm

WORKDIR /usr/local/nebula

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.tools
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN cd /home/nebula/BUILD/package \

FROM centos:7

COPY --from=builder /home/nebula/BUILD/build/cpack_output/nebula-*-tool.rpm /usr/local/nebula/nebula-tool.rpm
COPY --from=builder /home/nebula/BUILD/pkg-build/cpack_output/nebula-*-tool.rpm /usr/local/nebula/nebula-tool.rpm

WORKDIR /usr/local/nebula

Expand Down