Skip to content

Commit b6c2a61

Browse files
committed
add docker hub build
1 parent f40f5a4 commit b6c2a61

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Dockerfile-release

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM alpine as builder
2+
ARG REPO VER TARGETPLATFORM
3+
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
4+
TARGET="x86_64-unknown-linux-musl"; \
5+
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
6+
TARGET="aarch64-unknown-linux-musl"; \
7+
elif [ "$TARGETPLATFORM" = "linux/386" ]; then \
8+
TARGET="i686-unknown-linux-musl"; \
9+
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
10+
TARGET="armv7-unknown-linux-musleabihf"; \
11+
fi && \
12+
wget https://github.com/${REPO}/releases/download/${VER}/notepad-${VER}-${TARGET}.tar.gz && \
13+
tar -xf notepad-${VER}-${TARGET}.tar.gz && \
14+
mv notepad /bin/
15+
16+
FROM scratch
17+
COPY --from=builder /bin/notepad /bin/notepad
18+
STOPSIGNAL SIGINT
19+
ENTRYPOINT ["/bin/notepad"]

0 commit comments

Comments
 (0)