Skip to content

Commit

Permalink
Fix manual devcontainer workflow on Linux
Browse files Browse the repository at this point in the history
This ensures that devcontainer can be built and manually run.

Signed-off-by: eriknordmark <erik@zededa.com>
  • Loading branch information
eriknordmark committed Aug 17, 2023
1 parent 431ca28 commit 3ca855b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN arch=$(uname -m); \
unzip protobuf.zip -d /usr/local; \
rm -f protobuf.zip

ADD https://github.com/seamia/protodot.git /protodot
RUN git clone https://github.com/seamia/protodot.git /protodot
RUN go build -C /protodot -o /usr/local/bin/protodot .

RUN mkdir -p $(go env GOPATH)
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,21 @@ devcontainer --workspace-folder . up
devcontainer exec --workspace-folder . make proto
```

#### Manual ad-hoc use of devcontainer on Linux

First the devcontainer needs to be built specifying the TARGETOS:
```bash
docker build -f .devcontainer/Dockerfile --build-arg TARGETOS=linux .
```

Then the produced container (hash) can be invoked and make run:
```bash
docker run --network=host -it -v $PWD:/home d9ca10a77a8c
cd home
make proto
exit
```

#### Local

If running locally, you need to install the prerequisites yourself.
Expand Down

0 comments on commit 3ca855b

Please sign in to comment.