• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Dockerfile
2# First image to build the binary
3FROM alpine as builder
4
5RUN apk --no-cache add make gcc libc-dev
6COPY . /src
7RUN mkdir /pkg && cd /src && make && make DESTDIR=/pkg install
8
9# Second minimal image to only keep the built binary
10FROM alpine
11
12# Copy the built files
13COPY --from=builder /pkg /
14
15# Copy the license as well
16RUN mkdir -p /usr/local/share/licenses/zstd
17COPY --from=builder /src/LICENSE /usr/local/share/licences/zstd/
18
19# Just run `zstd` if no other command is given
20CMD ["/usr/local/bin/zstd"]
21