Update armhf to use armv6 binaries

This commit is contained in:
Alex Ellis 2017-02-28 22:10:19 +00:00
parent f6729358a1
commit 80c12aeaea
6 changed files with 57 additions and 3 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
fwatchdog
**/node_modules/
fwatchdog
fwatchdog-armhf

View File

@ -1,6 +1,6 @@
FROM armhf/alpine:latest
FROM armhf/alpine:3.5
COPY fwatchdog /usr/bin
ADD https://github.com/alexellis/faas/releases/download/v0.3-alpha/fwatchdog-armhf /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
# Populate example here

View File

@ -0,0 +1,15 @@
FROM armhf/alpine:3.5
ADD https://github.com/alexellis/faas/releases/download/v0.3-alpha/fwatchdog-armhf /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
WORKDIR /root/
EXPOSE 8080
ENV http_proxy ""
ENV https_proxy ""
COPY app .
ENV fprocess="/root/app"
CMD ["fwatchdog"]

View File

@ -0,0 +1,11 @@
FROM alexellis2/alexellis2/go-armhf:1.7.4
RUN mkdir -p /go/src/app
COPY handler.go /go/src/app
WORKDIR /go/src/app
RUN go get github.com/microcosm-cc/bluemonday && \
go get github.com/russross/blackfriday
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
CMD ["echo"]

View File

@ -0,0 +1,14 @@
#!/bin/sh
echo Building alexellis2/faas-markdownrender:build-armhf
docker build --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy \
-t alexellis2/faas-markdownrender:build-armhf \
. -f Dockerfile.build.armhf
docker create --name render_extract alexellis2/faas-markdownrender:build-armhf
docker cp render_extract:/go/src/app/app ./app
docker rm -f render_extract
echo Building alexellis2/faas-markdownrender:latest-armhf
docker build --no-cache -t alexellis2/faas-markdownrender:latest-armhf .\
-f Dockerfile.armhf

13
watchdog/build.armhf.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# Below makes use of "builder pattern" so that binary is extracted separate
# from the golang runtime/SDK
echo Building alexellis2/faas-watchdog:build-armhf
docker build --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy \
-t alexellis2/faas-watchdog:build-armhf . -f Dockerfile.armhf
docker create --name buildoutput alexellis2/faas-watchdog:build-armhf echo
docker cp buildoutput:/go/src/app/app ./fwatchdog-armhf
docker rm buildoutput