Skip to content

Commit

Permalink
base: add musl build.
Browse files Browse the repository at this point in the history
This is intended mainly for building fully static IOCs to be deployed on
older machines. We are using Alpine since it's the main musl-based
distro with LTS releases.
  • Loading branch information
ericonr committed Nov 29, 2023
1 parent 17c8fea commit c7778b8
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 0 deletions.
1 change: 1 addition & 0 deletions base/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DEBIAN_VERSION=11.7
ALPINE_VERSION=3.18.4

EPICS7_BASE_VERSION=7.0.7

Expand Down
1 change: 1 addition & 0 deletions base/musl/.env
55 changes: 55 additions & 0 deletions base/musl/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
ARG ALPINE_VERSION

FROM alpine:$ALPINE_VERSION

ARG JOBS

RUN apk add --no-cache \
bash \
g++ \
libevent-dev \
libevent-static \
libtirpc-dev \
libtirpc-static \
linux-headers \
make \
musl-dev \
ncurses-terminfo \
patch \
perl \
rpcsvc-proto \
gcc \
meson \
re2c \
readline-dev \
readline-static

COPY lnls-get-n-unpack.sh /usr/local/bin/lnls-get-n-unpack
COPY lnls-run.sh /usr/local/bin/lnls-run

ARG EPICS_BASE_VERSION
ENV EPICS_BASE_PATH /opt/epics/base
ENV EPICS_MODULES_PATH /opt/epics/modules
ENV EPICS_RELEASE_FILE /opt/epics/RELEASE

WORKDIR /opt/epics
COPY install-functions.sh .

COPY backport-epics-base-musl.patch .
COPY install_epics.sh .
RUN ./install_epics.sh

ARG SEQUENCER_VERSION
ARG CALC_VERSION
ARG ASYN_VERSION
ARG STREAMDEVICE_VERSION
ARG BUSY_VERSION
ARG AUTOSAVE_VERSION
ARG SSCAN_VERSION
ARG RECCASTER_VERSION
ARG IPAC_VERSION
ARG CAPUTLOG_VERSION

WORKDIR ${EPICS_MODULES_PATH}
COPY install_modules.sh .
RUN NEEDS_TIRPC=YES ./install_modules.sh
24 changes: 24 additions & 0 deletions base/musl/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
services:
epics-base:
image: ${REGISTRY:-ghcr.io/cnpem}/lnls-alpine-3.18-epics-7:$TAG
build:
context: ../
dockerfile: musl/Dockerfile
labels:
org.opencontainers.image.revision: ${TAG}
org.opencontainers.image.source: ${SOURCE:-https://github.com/cnpem/epics-in-docker}
org.opencontainers.image.description: "EPICS base and modules build image for fully static executables"
args:
JOBS: ${JOBS:-1}
ALPINE_VERSION: ${ALPINE_VERSION}
EPICS_BASE_VERSION: ${EPICS7_BASE_VERSION}
SEQUENCER_VERSION: ${SEQUENCER_VERSION}
CALC_VERSION: ${CALC_VERSION}
ASYN_VERSION: ${ASYN_VERSION}
STREAMDEVICE_VERSION: ${STREAMDEVICE_VERSION}
BUSY_VERSION: ${BUSY_VERSION}
AUTOSAVE_VERSION: ${AUTOSAVE_VERSION}
SSCAN_VERSION: ${SSCAN_VERSION}
RECCASTER_VERSION: ${RECCASTER_VERSION}
IPAC_VERSION: ${IPAC_VERSION}
CAPUTLOG_VERSION: ${CAPUTLOG_VERSION}

0 comments on commit c7778b8

Please sign in to comment.