Skip to content

Commit

Permalink
fix docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
yunwei37 committed Mar 24, 2023
1 parent 732dc03 commit d1d3125
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ jobs:
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: install deps
run: |
sudo apt-get install -y --no-install-recommends \
wget pkg-config build-essential zlib1g-dev \
clang llvm libelf1 libelf-dev
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Cache rust
uses: Swatinem/rust-cache@v2

- name: build package
run: make build

# setup Docker buld action
- name: Set up Docker Buildx
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Dockerfile, and GitHub action, along with all necessary dependencies to simplify

Also, this is a minimal libbpf-rs project, you can read the code to understand how to write ebpf programs using libbpf-rs.


借助于 GitHub 模板和 Github Codespace,可以轻松构建 eBPF 项目和开发环境,一键在线编译运行 eBPF 程序。关于中文的文档和详细的 eBPF 开发教程,可以参考:https://github.com/eunomia-bpf/bpf-developer-tutorial

## **Getting Started**

Expand All @@ -22,7 +22,7 @@ a new repository in your account with the same files and structure as this templ
Run the following code and you will enter a docker environment with all the basic development dependencies and tools.

```sh
docker run -it ghcr.io/eunomia-bpf/libbpf-rs-template:latest
docker run --rm -it --privileged ghcr.io/eunomia-bpf/libbpf-rs-template:latest
```

## **Features**
Expand Down Expand Up @@ -57,6 +57,7 @@ For dependencies, it varies from distribution to distribution. You can refer to
On Ubuntu, you may run `make install` or

```sh
sudo apt update
sudo apt-get install -y --no-install-recommends \
libelf1 libelf-dev zlib1g-dev \
make clang llvm
Expand Down
4 changes: 2 additions & 2 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM ubuntu:22.04

WORKDIR /root/
COPY . /root/
COPY ./target/release/runqslower /root/runqslower

RUN apt-get update \
&& apt-get install -y --no-install-recommends libelf1 \
&& rm -rf /var/lib/apt/lists/*

ENTRYPOINT ["/root/target/release/runqslower"]
ENTRYPOINT ["/root/runqslower"]

0 comments on commit d1d3125

Please sign in to comment.