FROM sgerrand/alpine-abuild:3.12 as build LABEL maintainer="Tine Jozelj " LABEL org.opencontainers.image.source https://github.com/mentos1386/workspace COPY --chown=builder packages/mosh /home/builder/package RUN sudo chown builder -R /home/builder/package ARG VERSION=master RUN sed -i 's/pkgver=master/pkgver=${VERSION}/g' /home/builder/package/APKBUILD RUN abuild -r deps RUN abuild fetch RUN abuild unpack RUN abuild prepare RUN abuild build RUN abuild package FROM alpine:3 # Install mosh, so we get the dependencies RUN apk --update --no-cache add mosh COPY --from=build /home/builder/package/pkg/mosh/usr/bin/mosh-server /usr/bin/mosh-server COPY --from=build /home/builder/package/pkg/mosh/usr/bin/mosh-client /usr/bin/mosh-client COPY --from=build /home/builder/package/pkg/mosh/usr/bin/mosh /usr/bin/mosh