Skip to content

Commit 6d4055c

Browse files
committed
updates for devcontainer changes
1 parent 98c95c1 commit 6d4055c

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

docs/reference/docker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ We do fully support `docker`, please report any issues you find.
1313

1414
There are a few things to know if you are using `docker` in your developer containers:
1515

16-
1. add `export EC_REMOTE_USER=vscode` into your `~/.bashrc` or `~/.bash_profile`. The epics-containers devcontainer.json files will use this to set the account that your user will use inside devcontainers.
16+
1. add `export EC_REMOTE_USER=$USER` into your `~/.profile`. The epics-containers devcontainer.json files will use this to set the account that your user will use inside devcontainers.
1717
1. you may need to tell git that you are ok with the repository permissions. `vscode` may ask you about this or you may need to do the command:
1818
```bash
1919
git config --global --add safe.directory <Git folder>

docs/tutorials/dev_container.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,22 @@ Users of docker need to instruct the devcontainer to use their own user id insid
154154
export EC_REMOTE_USER=$USER
155155
```
156156

157-
It is suggested that you place this command in **.bashrc** to make it permanent.
157+
It is recommended that you place this command in **.profile** to make it permanent.
158158

159-
If you do not do this, your devcontainer will run as root. Although it will still work, it is not recommended. (my apologies to docker users - I wanted to make the devcontainer compatible with both docker and podman and this is the least invasive method I could come up with).
159+
If you do not do this, your devcontainer will run as root. Although it will still work, it is not recommended. Also, forgetting to set EC_REMOTE_USER before launching a pre-existing devcontainer will cause errors. (my apologies to docker users - I wanted to make the devcontainer compatible with both docker and podman and this is the least invasive method I could come up with).
160160
:::
161161

162+
### First Time Preparation
163+
164+
The devcontainer uses a docker network that it can share with a ca-gateway in order that your PVs are accessible from your host machine. We arrange to create this network once and as long as you don't delete it or reset docker it will be available for all your devcontainers going forward.
165+
166+
To create the network run the following commands:
167+
168+
```bash
169+
cd ioc-adsimdetector
170+
source ./compose/environment.sh
171+
```
172+
162173
### Launching the Developer Container
163174

164175
In this section we are going to use vscode to launch a developer container. This means that all vscode terminals and editors will be running inside our container and browsing for files with vscode uses the container filesystem. This is a very convenient way to work because it makes it possible to archive away the development environment alongside the source code. It also means that you can easily share the development environment with other developers, and your development environment is portable between machines.

0 commit comments

Comments
 (0)