Skip to content

Commit

Permalink
Add fpm experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorific committed Nov 12, 2023
1 parent b1691ea commit 869130c
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions fpm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.ninja_log
24 changes: 24 additions & 0 deletions fpm/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# syntax=docker/dockerfile:1
ARG CONTAINER_REGISTRY=docker.io

FROM $CONTAINER_REGISTRY/ubuntu:jammy-20231004 as system-ruby
RUN <<EOF
apt-get update
apt-get install --no-install-recommends --no-install-suggests -y \
'ruby=*'
rm -rf /var/lib/apt/lists/*
EOF

FROM system-ruby

ENV GEM_PATH=/fpm
ENV PATH="/fpm/bin:${PATH}"
RUN <<EOF
useradd --create-home --shell /bin/bash fpm
gem install --no-document --install-dir=/fpm fpm:1.15.1
EOF

USER fpm
WORKDIR /src
ENTRYPOINT ["/fpm/bin/fpm"]
CMD ["-h"]
1 change: 1 addition & 0 deletions fpm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# fpm
4 changes: 4 additions & 0 deletions fpm/build.ninja
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
rule lint
command = docker container run --rm -i docker.io/boxcutter/hadolint hadolint - < Containerfile

build lint: lint
19 changes: 19 additions & 0 deletions fpm/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
variable "LOCAL_PLATFORM" {
default="${BAKE_LOCAL_PLATFORM}" == "darwin/arm64/v8" ? "linux/arm64/v8" : "${BAKE_LOCAL_PLATFORM}"
}

target "local" {
dockerfile = "Containerfile"
tags= [
"docker.io/boxcutter/fpm:latest"
]
platforms = ["${LOCAL_PLATFORM}"]
}

target "default" {
dockerfile = "Containerfile"
tags= [
"docker.io/boxcutter/fpm:latest"
]
platforms = ["linux/amd64", "linux/arm64/v8"]
}

0 comments on commit 869130c

Please sign in to comment.