-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce docker and add some unit tests.
- Loading branch information
Showing
8 changed files
with
155 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM alpine:3.16 AS builder | ||
|
||
ARG VERSION=0.1.18 | ||
ARG TARGETPLATFORM | ||
ARG PLATFORM=${TARGETPLATFORM#linux/} | ||
|
||
WORKDIR /home/totebag | ||
|
||
RUN apk add --no-cache curl tar gzip \ | ||
&& curl -LO https://github.com/tamada/totebag/releases/download/v${VERSION}/totebag-${VERSION}_linux_${PLATFORM}.tar.gz \ | ||
&& tar xvfz totebag-${VERSION}_linux_${PLATFORM}.tar.gz | ||
|
||
FROM alpine:3.16 | ||
|
||
ARG VERSION=0.1.18 | ||
|
||
LABEL org.opencontainers.image.source https://github.com/tamada/totebag | ||
|
||
RUN apk add --no-cache libgcc musl-dev \ | ||
&& adduser -D nonroot \ | ||
&& mkdir -p /workdir | ||
|
||
COPY --from=builder /home/totebag/totebag-${VERSION}/totebag /opt/totebag/totebag | ||
|
||
WORKDIR /workdir | ||
USER nonroot | ||
|
||
ENTRYPOINT [ "/opt/totebag/totebag" ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters