COPY --from=mattipaksula/reflex:sha-0238059 /* /usr/bin/
RUN apk add --no-cache libcap
COPY --from=mattipaksula/harderdns:sha-674b3ac /* /usr/local/bin
RUN setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/harderdns
# now harderdns can bind :53
FROM --platform=linux/amd64 ubuntu:20.04
Write history to the disk immediately
ENV PROMPT_COMMAND="history -a"
create the file locally (otherwise it will be a directory) with touch .bash_history
and then bind mount the file:
volumes:
- ./.bash_history:/root/.bash_history
create a temporary directory, extract all, move needed and delete rest
RUN mkdir /ghjk && cd /ghjk \
&& curl -Lsf -O https://github.com/cloudflare/cloudflare-go/releases/download/v0.36.0/flarectl_0.36.0_linux_amd64.tar.xz \
&& tar -xvof flarectl_0.36.0_linux_amd64.tar.xz \
&& mv flarectl /usr/local/bin \
&& rm -rf /ghjk
FROM --platform=linux/amd64 ubuntu:20.04
ENV PATH="/root/.asdf/shims/:/asdf/bin:${PATH}"
RUN export DEBIAN_FRONTEND=noninteractive; apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
git curl
RUN git clone https://github.com/asdf-vm/asdf.git /asdf --branch v0.9.0
WORKDIR /app
COPY .tool-versions .
RUN asdf plugin add eksctl
RUN asdf plugin add kubectl
RUN asdf plugin add jq
RUN asdf plugin add helm
RUN asdf install
FROM --platform=linux/amd64 user/image as cache
FROM --platform=linux/amd64 ruby:3.0.0-alpine
WORKDIR /app
COPY --from=cache /usr/local/bundle/ /usr/local/bundle/
COPY Gemfile .
# this will still run, but gems are already installed
RUN apk add --no-cache --virtual .gem-deps \
build-base \
&& gem install bundler -v 2.1.4 \
&& bundle install --jobs $(nproc) \
&& bundle clean --force \
&& apk del .gem-deps
RUN [ "$(uname -m)" = "aarch64" ] && arch=arm64 || arch=amd64 \
&& mkdir /ghjk && cd /ghjk \
&& curl -Lsf -O https://go.dev/dl/go1.19.1.linux-${arch}.tar.gz \
&& tar -C /usr/local -xzf go1.19.1.linux-${arch}.tar.gz \
&& rm -rf /ghjk
WORKDIR /app