Skip to content
Permalink
Browse files
feat(buildah): publish initial werf image with compiled werf binary a…
…nd buildah environment

* Image published by the commit for now: ghcr.io/werf/werf:COMMIT.
* Image includes full buildah environment for now rather than minimal werf dependencies.
  • Loading branch information
distorhead committed Nov 26, 2021
1 parent 9b1f16a commit 20dde28c4d182469e7c584a9b4e0a959686504f4
Showing with 28 additions and 0 deletions.
  1. +15 −0 scripts/werf-in-docker/Dockerfile
  2. +7 −0 scripts/werf-in-docker/build.sh
  3. +6 −0 scripts/werf-in-docker/publish.sh
@@ -0,0 +1,15 @@
FROM ghcr.io/werf/builder:afd00fa1348645658b718df6b2b7447c6cead90b@sha256:829a6fd3d5850fc24366b5a3fb10402fe2d5615dcfd045b7225819c7a8ec5011
ARG build_version
ADD cmd /werf/cmd
ADD pkg /werf/pkg
ADD go.mod /werf/go.mod
ADD go.sum /werf/go.sum
ADD scripts/build_release_v3.sh /werf/scripts/build_release_v3.sh
RUN cd /werf && go mod download
RUN cd /werf && ./scripts/build_release_v3.sh $build_version

FROM ghcr.io/werf/buildah:v1.22.3-1
ARG build_version
RUN yum install -y git curl gpg
COPY --from=0 /werf/release-build/$build_version/linux-amd64/bin/werf /usr/local/bin/werf
ENV WERF_CONTAINER_RUNTIME_BUILDAH=native-rootless
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

BUILD_VERSION="$(git rev-parse HEAD)"
IMAGE_NAME=ghcr.io/werf/werf:$BUILD_VERSION
docker build -f scripts/werf-in-docker/Dockerfile --build-arg build_version=$BUILD_VERSION -t $IMAGE_NAME .
@@ -0,0 +1,6 @@
#!/bin/bash

set -e

IMAGE_NAME=ghcr.io/werf/werf:"$(git rev-parse HEAD)"
docker push $IMAGE_NAME

0 comments on commit 20dde28

Please sign in to comment.