mirror of
https://github.com/b4tman/armhf-alpine-qemu.git
synced 2024-12-05 01:26:54 +00:00
Merge branch 'multistage'
This commit is contained in:
commit
f43d7d3d17
26
Dockerfile
26
Dockerfile
@ -1,8 +1,30 @@
|
||||
FROM golang:alpine as build
|
||||
|
||||
WORKDIR /tmp/build
|
||||
|
||||
COPY resin-xbuild.go /tmp/build
|
||||
|
||||
RUN go build -ldflags "-w -s" resin-xbuild.go
|
||||
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
ENV QEMU_RELEASE_TAG v2.9.0+resin1
|
||||
ENV QEMU_RELEASE_FILE qemu-2.9.0.resin1-arm.tar.gz
|
||||
ENV QEMU_RELEASE_SHA256 b39d6a878c013abb24f4cccc7c3a79829546ae365069d5712142a4ad21bcb91b
|
||||
|
||||
RUN QEMU_URL="https://github.com/resin-io/qemu/releases/download/${QEMU_RELEASE_TAG}/${QEMU_RELEASE_FILE}" ; \
|
||||
curl -fsSL ${QEMU_URL} -o ${QEMU_RELEASE_FILE}
|
||||
|
||||
RUN echo "${QEMU_RELEASE_SHA256} ${QEMU_RELEASE_FILE}" > ${QEMU_RELEASE_FILE}.sha256sum \
|
||||
sha256sum -c ${QEMU_RELEASE_FILE}.sha256sum
|
||||
|
||||
RUN tar --strip 1 -xzf ${QEMU_RELEASE_FILE}
|
||||
|
||||
FROM arm32v6/alpine
|
||||
|
||||
ENV QEMU_EXECVE 1
|
||||
|
||||
COPY qemu-arm-static /usr/bin
|
||||
COPY resin-xbuild /usr/bin
|
||||
COPY --from=build /tmp/build/qemu-arm-static /usr/bin
|
||||
COPY --from=build /tmp/build/resin-xbuild /usr/bin
|
||||
|
||||
RUN [ "/usr/bin/qemu-arm-static", "/bin/sh", "-exc", "ln -s resin-xbuild /usr/bin/cross-build-start; ln -s resin-xbuild /usr/bin/cross-build-end; ln /bin/sh /bin/sh.real" ]
|
||||
|
16
get-qemu.sh
16
get-qemu.sh
@ -1,16 +0,0 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
QEMU_RELEASE_TAG="v2.9.0+resin1"
|
||||
QEMU_RELEASE_FILE="qemu-2.9.0.resin1-arm.tar.gz"
|
||||
QEMU_RELEASE_SHA256="b39d6a878c013abb24f4cccc7c3a79829546ae365069d5712142a4ad21bcb91b"
|
||||
|
||||
QEMU_URL="https://github.com/resin-io/qemu/releases/download/${QEMU_RELEASE_TAG}/${QEMU_RELEASE_FILE}"
|
||||
curl -fsSL ${QEMU_URL} -o ${QEMU_RELEASE_FILE}
|
||||
|
||||
echo "${QEMU_RELEASE_SHA256} ${QEMU_RELEASE_FILE}" > ${QEMU_RELEASE_FILE}.sha256sum
|
||||
sha256sum -c ${QEMU_RELEASE_FILE}.sha256sum
|
||||
rm -f ${QEMU_RELEASE_FILE}.sha256sum
|
||||
|
||||
rm -f qemu-arm-static
|
||||
tar --strip 1 -xzf ${QEMU_RELEASE_FILE}
|
||||
rm -f ${QEMU_RELEASE_FILE}
|
BIN
qemu-arm-static
BIN
qemu-arm-static
Binary file not shown.
BIN
resin-xbuild
BIN
resin-xbuild
Binary file not shown.
Loading…
Reference in New Issue
Block a user