Skip to content

Commit

Permalink
extension: fixing bug with incorrect simple server architecture being…
Browse files Browse the repository at this point in the history
… installed
  • Loading branch information
ericjohnson97 authored and patrickelectric committed Feb 24, 2024
1 parent 44da938 commit f472cb0
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
# Build frontend
FROM --platform=$BUILDPLATFORM oven/bun:1.0.3-slim AS frontendBuilder

ARG TARGETARCH

RUN mkdir /frontend && ls /frontend
COPY . /frontend
RUN bun install --cwd /frontend
RUN bun run --cwd /frontend build

FROM alpine:3.14

ARG TARGETARCH
# Install simple http server
RUN apk add --no-cache wget
RUN wget https://github.com/TheWaWaR/simple-http-server/releases/download/v0.6.6/armv7-unknown-linux-musleabihf-simple-http-server \
-O /usr/bin/simple-http-server
RUN if [ "$TARGETARCH" = "amd64" ]; then \
wget https://github.com/TheWaWaR/simple-http-server/releases/download/v0.6.6/x86_64-unknown-linux-musl-simple-http-server -O /usr/bin/simple-http-server; \
elif [ "$TARGETARCH" = "arm64" ]; then \
wget https://github.com/TheWaWaR/simple-http-server/releases/download/v0.6.6/aarch64-unknown-linux-musl-simple-http-server -O /usr/bin/simple-http-server; \
elif [ "$TARGETARCH" = "arm" ]; then \
wget https://github.com/TheWaWaR/simple-http-server/releases/download/v0.6.6/armv7-unknown-linux-musleabihf-simple-http-server -O /usr/bin/simple-http-server; \
else \
echo "Unsupported architecture: $TARGETARCH"; exit 1; \
fi

RUN chmod +x /usr/bin/simple-http-server

LABEL authors='[\
Expand Down

0 comments on commit f472cb0

Please sign in to comment.