@@ -82,6 +82,10 @@ The next section will show you how to use this feature. Note that you can use
82
82
any IDE that supports remote development in a container, you could also
83
83
simply launch the developer container in a shell and use it via CLI only.
84
84
85
+ TODO: add features to ``ec dev `` to launch the container in developer mode,
86
+ with appropriate host mounts. This will enable non vscode users developer
87
+ containers.
88
+
85
89
Starting a Developer Container
86
90
------------------------------
87
91
@@ -224,7 +228,8 @@ It is useful to understand that /epics/ioc is a soft link to the IOC source
224
228
that came with your generic IOC source code. Therefore if you edit this
225
229
code and recompile it, the changes will be visible inside the container and
226
230
outside the container. Meaning that the repository ``ioc-adsimdetector `` is
227
- now showing your changes and you could push them up to GitHub if you wanted.
231
+ now showing your changes in it's ``ioc `` folder and you could push them
232
+ up to GitHub if you wanted.
228
233
229
234
The above is true because your project folder ioc-adsimdetector is mounted into
230
235
the container's filesystem with a bind mount at the same place that the
@@ -240,19 +245,21 @@ destroyed when the container is rebuilt or deleted.
240
245
See `container-layout `_ for details of which host folders are mounted into the
241
246
container.
242
247
243
- The IOC code is entirely boilerplate, the ``/epics/ioc/iocApp/src/Makefile ``
248
+ The IOC source code is entirely boilerplate, ``/epics/ioc/iocApp/src/Makefile ``
244
249
determines which dbd and lib files to link by including two files that
245
- ``ibek `` generated during the container build namely
250
+ ``ibek `` generated during the container build. You can see these files in
246
251
``/epics/support/configure/lib_list `` and ``/epics/support/configure/dbd_list ``.
252
+
247
253
Although all Generic IOCs derived from ioc-template start out with the same
248
- generic source in `` iocApp/src `` , you are free to change them if there is
254
+ generic source, you are free to change them if there is
249
255
a need for different compilation options etc.
250
256
251
257
The Generic IOC should now be ready to run inside of the container. To do this:
252
258
253
259
.. code-block :: bash
254
260
255
- ./start.sh
261
+ cd /epics/ioc
262
+ ./start.sh
256
263
257
264
You will just see the default output of a Generic IOC that has no Instance
258
265
configuration. Hit ``Ctrl-C `` to stop the this default script.
@@ -344,6 +351,18 @@ host. i.e. the root folder under which your projects are all cloned):
344
351
- WS/ioc-adsimdetector
345
352
- A second - fixed location mount of the Generic IOC source repo
346
353
354
+ IMPORTANT: remember that the container filesystem is temporary and will be
355
+ destroyed when the container is rebuilt or deleted. All folders above with
356
+ ``Host Mount Path `` ``N/A `` are in the container filesystem. The devcontainer
357
+ has been configured to mount the most useful host folders, but note that
358
+ all support modules are in the container filesystem. Later we will learn
359
+ how to work on support modules, first ensuring that they are made available
360
+ in the host filesystem.
361
+
362
+ Also note that VSCode keeps your developer container until you rebuild it
363
+ or explicitly delete it. Restarting your PC and coming back to the same
364
+ devcontainer does keep all state. This can make you complacent about doing
365
+ work in the container filesystem, this is not recommended.
347
366
348
367
.. _choose-ioc-instance :
349
368
@@ -369,6 +388,15 @@ means we can edit the config, restart the IOC to test it and the changes
369
388
will already be in place in the beamline repo. You can even open a shell
370
389
onto the beamline repo and commit and push the changes.
371
390
391
+ .. note ::
392
+
393
+ The manual steps above were shown to demonstrate the process. In practice
394
+ you can use this command to do the same thing:
395
+
396
+ .. code-block :: bash
397
+
398
+ ibek dev instance /workspaces/bl01t/iocs/bl01t-ea-ioc-02
399
+
372
400
Wrapping Up
373
401
-----------
374
402
0 commit comments