snappy-java/docker/Dockerfile.linux-x86_64-musl
Samuel Fernandes ded9f16e05
feat: add support to x64 systems using musl (#632)
* fix: add snappy support

* fix: update alpine image

* fix: update files

* fix: dockerfile building

* feat: adding alpine architecture

* feat: adding alpine architecture

* feat: reset files

* fix: remove code not used

* docs: update build.md

* fix: dockerfile name

* feat: rename osname and image arch

* feat: rename osname and image arch

* feat: add try catch block

* feat: better error message

* feat: address review comments

* Update src/main/java/org/xerial/snappy/OSInfo.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix: use standard OSGi processor value for musl variant

Changed processor=x86-64-musl to processor=x86-64 in Bundle-NativeCode
as x86-64-musl is not a valid OSGi processor value. The OSGi spec only
recognizes x86-64 (and aliases: amd64, em64t, x86_64) for 64-bit x86.

Also fixed osname=Linux to osname=linux for consistency with other entries.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: correct indentation in OSInfo.java catch block

Fixed improper indentation of catch statement at line 237

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Taro L. Saito <leo@xerial.org>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-19 12:52:26 -07:00

37 lines
767 B
Docker

FROM alpine:3.18
# Set workspace directory
WORKDIR /work
# Copy the project to the container
COPY . .
# Install build dependencies
RUN apk add --no-cache \
openjdk8 \
cmake \
make \
gcc \
g++ \
musl-dev \
linux-headers \
git \
util-linux \
bash \
curl
# Install SBT
RUN curl -L "https://github.com/sbt/sbt/releases/download/v1.9.7/sbt-1.9.7.tgz" | tar xz -C /usr/local
ENV PATH="/usr/local/sbt/bin:${PATH}"
# Install python/pip
ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools
# Set Env Vars
ENV CC=gcc CXX=g++
ENV JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
ENV PATH="${JAVA_HOME}/bin:${PATH}"