Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.

Commit 6ec9e1c

Browse files
committed
Update Dockerfile and docker-publish.yml
1 parent eb408ce commit 6ec9e1c

File tree

3 files changed

+60
-27
lines changed

3 files changed

+60
-27
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docker
1+
name: Docker-Publish
22

33
# This workflow uses actions that are not certified by GitHub.
44
# They are provided by a third-party and are governed by

Dockerfile

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
FROM ubuntu:noble
22

3-
LABEL org.opencontainers.image.authors="hywooo" \
3+
LABEL org.opencontainers.image.authors="<github.com>HYwooo" \
44
org.opencontainers.image.title="bsv-wsl2" \
55
org.opencontainers.image.description="Docker image for Bluespec SystemVerilog environment on WSL2,compatible with https://github.com/WangXuan95/BSV_Tutorial_cn ." \
66
org.opencontainers.image.url="https://github.com/HYwooo/Docker-BSV-WSL2" \
77
org.opencontainers.image.source="https://github.com/HYwooo/Docker-BSV-WSL2" \
88
org.opencontainers.image.documentation="https://github.com/HYwooo/Docker-BSV-WSL2/blob/master/README.md" \
9-
org.opencontainers.image.version="1.0" \
9+
org.opencontainers.image.version="1.0.1" \
1010
org.opencontainers.image.licenses="MIT"
1111

12-
1312
RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.tuna.tsinghua.edu.cn@g' /etc/apt/sources.list.d/ubuntu.sources \
14-
&& apt-get update \
15-
&& apt-get install -y --no-install-recommends ca-certificates g++ wget iverilog tcl-dev gtkwave nano git
13+
&& apt update -y && apt upgrade -y
14+
15+
RUN apt install -y --no-install-recommends ca-certificates g++ wget iverilog tcl-dev gtkwave nano git
1616

1717
WORKDIR /opt
1818

1919
RUN wget https://github.com/B-Lang-org/bsc/releases/download/2024.07/bsc-2024.07-ubuntu-24.04.tar.gz \
2020
&& tar -xvf bsc-2024.07-ubuntu-24.04.tar.gz -C /opt \
2121
&& mv /opt/bsc-2024.07-ubuntu-24.04 /opt/bsc \
22-
&& rm bsc-2024.07-ubuntu-24.04.tar.gz \
23-
&& cd /usr && mkdir work && cd /usr/work \
22+
&& rm bsc-2024.07-ubuntu-24.04.tar.gz
23+
24+
WORKDIR /
25+
26+
RUN mkdir /data && cd /data \
2427
&& git clone https://github.com/WangXuan95/BSV_Tutorial_cn.git \
25-
&& cp /usr/work/BSV_Tutorial_cn/bsvbuild.sh /opt/bsc/bin/ && chmod +x /opt/bsc/bin/bsvbuild.sh
26-
27-
ENV PATH=/opt/bsc/bin:$PATH LIBRARY_PATH=/opt/bsc/lib:$LIBRARY_PATH
28+
&& cp /data/BSV_Tutorial_cn/bsvbuild.sh /opt/bsc/bin/ && chmod +x /opt/bsc/bin/bsvbuild.sh
2829

29-
ENV DISPLAY=host.docker.internal:0.0 LIBGL_ALWAYS_INDIRECT=1
30+
ENV PATH=/opt/bsc/bin:$PATH
3031

31-
WORKDIR /
32+
ENV DISPLAY=host.docker.internal:0.0 LIBGL_ALWAYS_INDIRECT=1 LIBRARY_PATH=/opt/bsc/lib
3233

3334
ENTRYPOINT ["/bin/bash"]

README.md

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,62 @@
11
# Docker-BSV-WSL2
2-
:whale: Docker for the *Bluespec SystemVerilog (BSV) Tutorial(CN Ver.)* from [![Static Badge](https://img.shields.io/badge/WangXuan95-BSV__Tutorial__cn-blue?style=flat-square&logo=github&cacheSeconds=3600)](https://github.com/WangXuan95/BSV_Tutorial_cn).
2+
![Static Badge](https://img.shields.io/badge/Docker-Image-blue?style=for-the-badge&logo=docker&color=blue&cacheSeconds=3600)![GitHub Repo stars](https://img.shields.io/github/stars/HYwooo/Docker-BSV-WSL2?style=for-the-badge&logo=github&cacheSeconds=3600) ![GitHub License](https://img.shields.io/github/license/HYwooo/Docker-BSV-WSL2?style=for-the-badge&logo=card&cacheSeconds=3600)
3+
4+
[![Static Badge](https://img.shields.io/badge/Compatible_with-WangXuan95/BSV__Tutorial__cn-blue?style=for-the-badge&logo=github&cacheSeconds=3600&color)](https://github.com/WangXuan95/BSV_Tutorial_cn)
5+
6+
Docker Image for Bluespec SystemVerilog environment on WSL2, compatible with *WangXuan95/BSV_Tutorial_cn*.
7+
38
> ❗ For educational purposes only.
49
5-
![GitHub Repo stars](https://img.shields.io/github/stars/HYwooo/Docker-BSV-WSL2?style=flat-square&logo=github&color=green)
610

7-
## Usage
8-
### GET the image
9-
#### PULL from Github Packages
11+
## :rocket:Usage
12+
### 1️⃣ GET the image
13+
#### PULL from Github Packages
14+
1015
```bash
11-
docker pull ghcr.io/hywooo/bsv-wsl2
16+
$ docker pull ghcr.io/hywooo/bsv-wsl2
1217
```
1318
#### or BUILD the image
1419
```bash
15-
$ docker build -f Dockerfile -t hywooo/bsv-wsl2:latest .
20+
$ docker build -f Dockerfile -t hywooo/bsv-wsl2 .
21+
```
22+
### 2️⃣ ENTER the container
23+
24+
```bash
25+
$ docker run -it --name="bsv-wsl2" --hostname yourname -v //path/to/wsl2/yourfiles:/path/to/yourfiles hywooo/bsv-wsl2
1626
```
17-
### ENTER the container
27+
### 3️⃣ CHECK whether the environment is correctly set
28+
1829
```bash
19-
$ docker run -it --name="bsv-wsl2" --hostname yourname -v //mnt/d/mybsvfile:/mnt/mybsvfile hywooo/bsv-wsl2:latest
30+
# /data/BSV_Tutorial_cn/src/1.Hello
31+
$ bsvbuild.sh -bs Hello.bsv
32+
# -e ./sim.out > /dev/stdout
33+
# Hello World!
34+
######
35+
$ bsvbuild.sh -vs Hello.bsv
36+
# Hello World!
37+
# mkTb.v:41: $finish(1) called at 5 (1s)
38+
######
39+
$ bsc
40+
# Usage:
41+
# bsc -help ...
42+
# ...
43+
######
44+
$ gtkwave
45+
# GTKWave Analyzer v3.3.116 (w)1999-2023 BSI
46+
# ...
2047
```
21-
## Container structure
48+
> :sparkles: NOTED: With `VcXsrv` installed, you are enabled to interact with `gtkwave` on Windows w/o any VNCs.
49+
50+
### 🎉ENJOY!
51+
52+
## 🗂️Container structure
53+
2254
```bash
2355
# /BSV_Tutorial_cn location
24-
~/usr/work/BSV_Tutorial_cn
56+
/data/BSV_Tutorial_cn
2557
# bsc location (ALREADY IN PATH)
26-
~/opt/bsc/bin/bsc
58+
/opt/bsc/bin/bsc
2759
# bsvbuild.sh location (ALREADY IN PATH)
28-
~/opt/bsc/bin
60+
/opt/bsc/bin/bsvbuild.sh
2961
```
30-
> :sparkles: NOTED: With `VcXsrv` installed, you are enabled to interact with `gtkwave` on Windows w/o any VNCs.
62+

0 commit comments

Comments
 (0)