Skip to content

Commit

Permalink
Merge pull request eesast#307 from ONLOX/dev
Browse files Browse the repository at this point in the history
Update dockerfile and docker.yml
  • Loading branch information
DreamEnderKing authored May 7, 2024
2 parents 3b72145 + 6cf311b commit 92e68a4
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 425 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ jobs:
- name: Push cpp_compile image to DockerHub
run: docker push ${{ secrets.DOCKER_USERNAME }}/thuai7_cpp:latest

- name: Build run docker image
run: docker build -t ${{ secrets.DOCKER_USERNAME }}/thuai7_run:latest -f ./dependency/Dockerfile/Dockerfile_run .
- name: Push run image to DockerHub
run: docker push ${{ secrets.DOCKER_USERNAME }}/thuai7_run:latest
- name: Build run_server docker image
run: docker build -t ${{ secrets.DOCKER_USERNAME }}/thuai7_run_server:latest -f ./dependency/Dockerfile/Dockerfile_run_server .
- name: Push run_server image to DockerHub
run: docker push ${{ secrets.DOCKER_USERNAME }}/thuai7_run_server:latest

- name: Build run_client docker image
run: docker build -t ${{ secrets.DOCKER_USERNAME }}/thuai7_run_client:latest -f ./dependency/Dockerfile/Dockerfile_run_client .
- name: Push run_client image to DockerHub
run: docker push ${{ secrets.DOCKER_USERNAME }}/thuai7_run_client:latest
29 changes: 0 additions & 29 deletions dependency/Dockerfile/Docker_run_client

This file was deleted.

20 changes: 0 additions & 20 deletions dependency/Dockerfile/Docker_run_server

This file was deleted.

5 changes: 2 additions & 3 deletions dependency/Dockerfile/Dockerfile_run_client
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ COPY . .
FROM eesast/thuai7_base:base
MAINTAINER eesast
WORKDIR /usr/local
COPY --from=build /usr/local/Server .
RUN mkdir /usr/local/team1 && mkdir /usr/local/team2 && mkdir /usr/local/playback
COPY ./dependency/shell/run_client.sh .
COPY ./dependency/shell/run.sh .
COPY ./CAPI/python /usr/local/PlayerCode/CAPI/python
COPY ./dependency/proto /usr/local/PlayerCode/dependency/proto
COPY ./dependency/shell /usr/local/PlayerCode/dependency/shell
Expand All @@ -17,4 +16,4 @@ RUN bash ../../dependency/shell/generate_proto.sh

WORKDIR /usr/local
RUN export TERMINAL=CLIENT
ENTRYPOINT [ "bash","./run.sh" ]
ENTRYPOINT [ "bash","./run.sh" ]
14 changes: 2 additions & 12 deletions dependency/Dockerfile/Dockerfile_run_server
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,16 @@ WORKDIR /usr/local
COPY . .
RUN dotnet publish logic/Server/Server.csproj -c Release -o /usr/local/Server --self-contained true -r linux-x64

FROM eesast/thuai7_base:base
MAINTAINER eesast
WORKDIR /usr/local
COPY --from=build /usr/local/Server .
RUN mkdir /usr/local/team1 && mkdir /usr/local/team2 && mkdir /usr/local/playback
<<<<<<<< HEAD:dependency/Dockerfile/Docker_run_client
COPY ./dependency/shell/run_client.sh .
========
COPY ./dependency/shell/run_server.sh .
>>>>>>>> 218cff729c2110699b9e40a0d97a740f58e75462:dependency/Dockerfile/Dockerfile_run_server
COPY ./dependency/shell/run.sh .
COPY ./CAPI/python /usr/local/PlayerCode/CAPI/python
COPY ./dependency/proto /usr/local/PlayerCode/dependency/proto
COPY ./dependency/shell /usr/local/PlayerCode/dependency/shell
WORKDIR /usr/local/PlayerCode/CAPI/python
RUN bash ../../dependency/shell/generate_proto.sh

WORKDIR /usr/local
<<<<<<<< HEAD:dependency/Dockerfile/Docker_run_client
ENTRYPOINT [ "bash","./run_client.sh" ]
========
RUN export TERMINAL=SERVER
ENTRYPOINT [ "bash","./run.sh" ]
>>>>>>>> 218cff729c2110699b9e40a0d97a740f58e75462:dependency/Dockerfile/Dockerfile_run_server
ENTRYPOINT [ "bash","./run.sh" ]
205 changes: 0 additions & 205 deletions dependency/py/rank.py

This file was deleted.

2 changes: 1 addition & 1 deletion dependency/shell/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ elif [ "$TERMINAL" = "CLIENT" ]; then
popd
else
echo "VALUE ERROR: TERMINAL is neither SERVER nor CLIENT."
fi
fi
Loading

0 comments on commit 92e68a4

Please sign in to comment.