diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..ad38e3b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +README.md +CODEOWNERS +LICENSE \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..827a946 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @bvis \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e8bec9c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +ARG VERSION=latest + +FROM curlimages/curl:${VERSION} + +USER root + +RUN apk add gettext libintl + +USER curl_user diff --git a/README.md b/README.md index 1e3babb..309001f 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,14 @@ # cURL-envsubst Docker image based on official cURL docker image, adding envsubst command for execute placeholders substitution when executing cURL commands. + +## Build + +It should be auto-built based in the repo tags, but you can do the same manually executing the next command: + +```shell +DOCKER_TAG=8.5.0 \ +IMAGE_NAME=softonic/curl-envsubst:8.5.0 \ +DOCKER_REPO=softonic/curl-envsubst \ + hooks/build +``` \ No newline at end of file diff --git a/hooks/build b/hooks/build new file mode 100755 index 0000000..e5993e7 --- /dev/null +++ b/hooks/build @@ -0,0 +1,13 @@ +#!/bin/bash + +docker buildx create --name curl-builder --driver docker-container --bootstrap 2> /dev/null || true +docker buildx use curl-builder + +docker buildx build \ + --pull \ + --push \ + --build-arg VERSION=${DOCKER_TAG} \ + . \ + --platform linux/arm64,linux/amd64 \ + -t ${IMAGE_NAME} \ + -t ${DOCKER_REPO}:latest \ No newline at end of file