Skip to content

Commit bc47b34

Browse files
committedFeb 3, 2025
Updated build instructions
1 parent fbe8f03 commit bc47b34

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed
 

‎Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ RUN echo '#!/bin/bash' > /entrypoint.sh \
1515
&& echo 'mkdir -p /workspace/bin/' >> /entrypoint.sh \
1616
&& echo 'cd /workspace/src/' >> /entrypoint.sh \
1717
&& echo '/usr/local/go/bin/go clean' >> /entrypoint.sh \
18-
&& echo 'echo "[+] Building"' >> /entrypoint.sh \
1918
&& echo 'if [ $# -ge 2 ]; then' >> /entrypoint.sh \
2019
&& echo ' OS=$1' >> /entrypoint.sh \
2120
&& echo ' GOARCH=$2' >> /entrypoint.sh \
@@ -30,9 +29,12 @@ RUN echo '#!/bin/bash' > /entrypoint.sh \
3029
&& echo ' *) echo "Unsupported architecture $ARCH"; exit 1 ;;' >> /entrypoint.sh \
3130
&& echo ' esac' >> /entrypoint.sh \
3231
&& echo 'fi' >> /entrypoint.sh \
33-
&& echo 'echo " ├──[>] Building for $OS $GOARCH"' >> /entrypoint.sh \
32+
&& echo 'echo "[>] Building for GOOS=$OS GOARCH=$GOARCH"' >> /entrypoint.sh \
3433
&& echo 'mkdir -p "/workspace/bin/$OS/$GOARCH/"' >> /entrypoint.sh \
34+
&& echo 'echo "[>] Writing binaries in ./bin/$OS/$GOARCH/"' >> /entrypoint.sh \
35+
&& echo 'echo "[>] Building: GOOS=$OS GOARCH=$GOARCH /usr/local/go/bin/go build -o "/workspace/bin/$OS/$GOARCH/" -buildvcs=false"' >> /entrypoint.sh \
3536
&& echo 'GOOS=$OS GOARCH=$GOARCH /usr/local/go/bin/go build -o "/workspace/bin/$OS/$GOARCH/" -buildvcs=false' >> /entrypoint.sh \
37+
&& echo 'echo "[>] Done"' >> /entrypoint.sh \
3638
&& chmod +x /entrypoint.sh
3739

3840
# Prepare workspace volume

‎README.md

+18
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<br>
1111
</p>
1212

13+
1314
## Features
1415

1516
- [x] Reads source value from a file containing a raw ntSecurityDescriptor structure, in raw bytes, hex string or base64 string formats.
@@ -68,6 +69,7 @@ Usage: DescribeNTSecurityDescriptor [--debug] [--domain <string>] [--username <s
6869
-vb, --value-base64 <string> Raw base64 encoded value of NTSecurityDescriptor. (default: "")
6970
```
7071

72+
7173
## Demonstration with a `--distinguished-name`
7274

7375
```bash
@@ -84,6 +86,22 @@ Usage: DescribeNTSecurityDescriptor [--debug] [--domain <string>] [--username <s
8486

8587
![](./.github/example_value.png)
8688

89+
90+
## Building the project
91+
92+
To build the project, use the following Docker command in this directory:
93+
94+
```bash
95+
docker run -v $(pwd):/workspace/ podalirius/build-go-project
96+
```
97+
98+
Or, if you want to build it manually, you can use the following commands:
99+
100+
```
101+
GOOS=linux GOARCH=amd64; mkdir -p "/workspace/bin/linux/${GOOS}/${GOARCH}/" && /usr/local/go/bin/go build -o "/workspace/bin/linux/${GOOS}/${GOARCH}/" -buildvcs=false
102+
```
103+
104+
87105
## Contributing
88106

89107
Pull requests are welcome. Feel free to open an issue if you want to add other features.

0 commit comments

Comments
 (0)
Please sign in to comment.