Skip to content

Commit

Permalink
Merge branch 'master' into fft-example
Browse files Browse the repository at this point in the history
  • Loading branch information
t-fine authored Jun 5, 2023
2 parents c003b4a + e92614b commit 812a1f4
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
8 changes: 8 additions & 0 deletions edge/services/cpu_percent/Dockerfile.riscv64
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM riscv64/debian:sid-slim
RUN apt-get update && apt-get install -y gawk bc socat curl
COPY *.sh /
WORKDIR /
RUN addgroup --system hzngroup && useradd -g hzngroup hznuser
USER hznuser
EXPOSE 8080
CMD /start.sh
52 changes: 52 additions & 0 deletions edge/services/gps/Dockerfile.riscv64
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Horizon GPS Location Service: gps
#
# This server provides REST access to gps receiver location and satellite data
# (or gps location estimated from the IP address if hardware is not available).
#
# More precise documentation of the behavior of this container may be found
# in the src/main.go source code.
#
# To build this server container, run the following command in this directory:
# $ make
#
# Written by Glen Darling, November 2016.
# Updated to 2-stage build, and modified to target arm32v6, May 2019.



# Build stage 0: Go compilation


FROM maiquanghiep/go:1.14.2

RUN apt-get update && apt-get install -y git

RUN mkdir -p /build/bin
COPY src /build/src

WORKDIR /build
RUN env GOPATH=/build GOOPTIONS_RISCV64='CGO_ENABLED=0 GOOS=linux GOARCH=riscv64' go get github.com/kellydunn/golang-geo

RUN env GOPATH=/build GOOPTIONS_RISCV64='CGO_ENABLED=0 GOOS=linux GOARCH=riscv64' go build -o /build/bin/riscv64_gps /build/src/main.go

# Build stage 1: The final container (including armv6_gps binary from above)

FROM riscv64/debian:sid-slim

# Install the gpsd daemon, and the certs needed to use https services
RUN apt-get update && apt-get install -y gpsd curl ca-certificates

# Copy in the server binary from stage 0 of the build (above)
COPY --from=0 /build/bin/riscv64_gps /gps

# Create hzngroup and hznuser
RUN addgroup --system hzngroup && useradd -g hzngroup hznuser

# Run container as hznuser user
USER hznuser

# The gps service uses this port to respond to REST requests
EXPOSE 8080

# Set the default command to be the go executable to start everything
CMD /gps
11 changes: 11 additions & 0 deletions edge/services/helloworld/Dockerfile.riscv64
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM carlosedp/busybox:latest

# Create hzngroup and hznuser
RUN addgroup -S hzngroup && adduser -S hznuser -G hzngroup

# Run container as hznuser user
USER hznuser

COPY *.sh /
WORKDIR /
CMD /service.sh

0 comments on commit 812a1f4

Please sign in to comment.