mirror of
https://github.com/Blockstream/satellite-api.git
synced 2025-02-22 13:42:33 +01:00
30 lines
1.1 KiB
Text
30 lines
1.1 KiB
Text
# docker build --cache-from blockstream/satapi-builder:latest -t blockstream/satapi-builder:latest -f Dockerfile.ci .
|
|
|
|
FROM docker@sha256:13ac93a28fec12fec2efad68351b10ec1bd9fa5929a0a98283597a506180b708 AS docker
|
|
FROM alpine:latest
|
|
|
|
COPY --from=docker /usr/local/bin/docker /usr/local/bin/docker
|
|
|
|
RUN apk --no-cache add curl python2 python3 py-crcmod bash libc6-compat openssh-client git gnupg
|
|
|
|
ENV RUBY_PACKAGES ruby ruby-io-console ruby-irb ruby-rake ruby-bundler ruby-bigdecimal ruby-json
|
|
ENV RUBY_DEPS libstdc++ tzdata bash ca-certificates openssl sqlite sqlite-dev
|
|
|
|
RUN apk update && \
|
|
apk upgrade && \
|
|
apk --update add $RUBY_PACKAGES $RUBY_DEPS && \
|
|
echo 'gem: --no-document' > /etc/gemrc
|
|
|
|
RUN mkdir /app && \
|
|
mkdir -p /data/ionosphere
|
|
|
|
COPY . /app
|
|
WORKDIR /app
|
|
|
|
# install packages needed for building compiled gems; install gems; then delete build dependencies to keep Docker image small
|
|
ENV BUILD_PACKAGES sudo build-base ruby-dev libc-dev linux-headers openssl-dev
|
|
RUN apk --update add --virtual build_deps $BUILD_PACKAGES && \
|
|
bundle update --bundler && \
|
|
bundle install && \
|
|
apk del build_deps && \
|
|
rm -rf /var/cache/apk/*
|