Skip to content

Commit 4f051aa

Browse files
committed
add docker-compose.yml for pydyna-pre
1 parent 9a15cf9 commit 4f051aa

File tree

4 files changed

+38
-8
lines changed

4 files changed

+38
-8
lines changed
File renamed without changes.

docker/README.rst renamed to docker/pre/README.rst

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Create your own pydyna-pre service docker container
44
The pydyna-pre service Docker containers can be easily built by following
55
these steps.
66

7-
Inside this folder, the instructions (i.e. ``Dockerfile.*`` files) for
7+
Inside this folder, the instructions (i.e. ``Dockerfile`` files) for
88
building the pydyna-pre service Docker containers are made available.
99

1010
* ``Dockerfile``: this file builds the Linux-based Docker image.
@@ -15,20 +15,29 @@ Prerequisites
1515
* Ensure that ``docker`` is installed in your machine.
1616
If you do not have ``docker`` available, please refer to the
1717
`official Docker site <https://www.docker.com>`_.
18+
Note that the container can also be started on Windows if the Docker Desktop has been installed.
19+
How to install the Docker Desktop: https://docs.docker.com/desktop/install/windows-install/
1820

19-
* Download the latest release artifacts for the Linux
20-
Docker container. You can do this as follows:
21+
* Download the latest release artifacts. You can do this as follows:
2122

2223
* Latest Linux artifacts: `linux-binaries.zip <https://github.com/ansys/pydyna/releases/download/v0.2.1/linux-binaries.zip>`_
2324

24-
* Move these ``.zip`` files to the current location (i.e. ``<repository-root-folder>/docker``).
25+
* Move these ``.zip`` files to the current location (i.e. ``<repository-root-folder>/docker/pre``).
26+
27+
Starting the docker container
28+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29+
30+
There are two ways to start docker container.
31+
32+
1.bulid image and run container
33+
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2534

2635
Building the Docker images
27-
^^^^^^^^^^^^^^^^^^^^^^^^^^
36+
::::::::::::::::::::::::::
2837

2938
In order to build your images, follow the next instructions:
3039

31-
* Locate yourself at ``<repository-root-folder>/docker`` in your terminal.
40+
* Locate yourself at ``<repository-root-folder>/docker/pre`` in your terminal.
3241
* Run the following Docker command:
3342

3443
.. code:: bash
@@ -52,7 +61,7 @@ In order to build your images, follow the next instructions:
5261
>>> ...... ...... ............ .............. ......
5362
5463
Run the image as a container
55-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64+
::::::::::::::::::::::::::::
5665

5766
* Run the following Docker command:
5867

@@ -67,4 +76,19 @@ Run the image as a container
6776
6877
6978
>>> CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
70-
>>> c77ffd67f9fa ghcr.io/ansys/ls-pre "python3 ./linux-bin…" 7 seconds ago Up 7 seconds 0.0.0.0:50051->50051/tcp, :::50051->50051/tcp hardcore_margulis
79+
>>> c77ffd67f9fa ghcr.io/ansys/ls-pre "python3 ./linux-bin…" 7 seconds ago Up 7 seconds 0.0.0.0:50051->50051/tcp, :::50051->50051/tcp hardcore_margulis
80+
81+
82+
2.Start the container from docker-compose.yml file
83+
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
84+
85+
Make sure the docker compose have been installed on your computer.
86+
For more information: https://docs.docker.com/compose/install/
87+
88+
* Locate yourself at ``<repository-root-folder>/docker/pre`` in your terminal.
89+
* Run the following Docker command:
90+
91+
.. code:: bash
92+
93+
docker compose up -d
94+

docker/pre/docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: "3.8"
2+
services:
3+
dyna-pre:
4+
build: ./
5+
ports:
6+
- 50051:50051
File renamed without changes.

0 commit comments

Comments
 (0)