Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Dockerfile
.*
ChangeLog
LICENSE
README.md
*.sh
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ams21/cmake:3 AS builder
WORKDIR /build

COPY . .
RUN apk update && apk upgrade --no-cache && apk add --no-cache zlib-dev openssl-dev
RUN cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC=ON . && make && make install

FROM scratch AS unshield-dockerized
WORKDIR /data

COPY --from=builder /usr/local/bin/unshield /app/unshield
# copy all dynamically linked libs to the same absolute paths used at runtime
# COPY --from=builder /usr/local/lib/libunshield.so.1 /usr/local/lib/libunshield.so.1
COPY --from=builder /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1
COPY --from=builder /usr/lib/libz.so.1 /usr/lib/libz.so.1
COPY --from=builder /usr/lib/libcrypto.so.3 /usr/lib/libcrypto.so.3

ENTRYPOINT ["/app/unshield"]
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,18 @@ cmake .
make
make install
```

Build From Dockerfile
-----------------

Process requires having Docker Engine installed

First build image
``` sh
docker build -t unshield:latest .
```

Now just enter your work directory with cab files and use
``` sh
docker run -it --rm -u$(id -u):$(id -g) --volume $(pwd):/data unshield:latest [ARGS]
```
Loading