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 based on
the README.md instructions

Signed-off-by: eriknordmark <erik@zededa.com>
  • Loading branch information
eriknordmark committed Aug 29, 2023
1 parent d6c88ba commit 0882b2f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.6.0
FROM alpine:3.18

ARG TARGETOS
ARG TARGETOS=linux
ARG TARGETARCH
ARG PROTOC_GEN_GO_VERSION=1.31.0
ARG PROTOC_VERSION=23.4
Expand All @@ -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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ 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 and then run to do the make proto:
```bash
docker build -f .devcontainer/Dockerfile -t eve-api-builder .
docker run --rm -v $(pwd):/src -w /src -u $(id -u) eve-api-builder make proto
```

#### Local

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

0 comments on commit 0882b2f

Please sign in to comment.