not working

This commit is contained in:
Gibson Ong 2026-05-19 22:27:10 +08:00
parent fa77becd67
commit 142a9c0465
5 changed files with 34 additions and 7 deletions

View file

@ -5,4 +5,5 @@ set -e
host_arch="$(dpkg --print-architecture)"
host_arch="${host_arch##*-}"
curl -L "https://go.dev/dl/go${GO_VERSION}.linux-${host_arch}.tar.gz" | tar -C /opt -zxv
# curl -L "https://go.dev/dl/go${GO_VERSION}.linux-${host_arch}.tar.gz" | tar -C /opt -zxv
curl -L "https://go.dev/dl/go1.26.3.linux-amd64.tar.gz" | tar -C /opt -zxv

View file

@ -14,6 +14,7 @@ install() {
# https://packages.ubuntu.com/search?suite=noble&section=all&arch=any&keywords=crossbuild-essential&searchon=names
apt-get update
apt-get upgrade -y --no-install-recommends
apt-get install -y --no-install-recommends build-essential \
gcc-s390x-linux-gnu \
crossbuild-essential-s390x \

View file

@ -74,7 +74,7 @@ EXPOSE 8200
# For production derivatives of this container, you should add the IPC_LOCK
# capability so that Vault can mlock memory.
COPY .release/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
# Use the Vault user as the default user for starting this container.
USER ${NAME}
@ -125,7 +125,7 @@ COPY ${LICENSE_SOURCE}/ /licenses/
# this (https://github.com/hashicorp/docker-vault/blob/master/ubi/Dockerfile),
# we copy in the Vault binary from CRT.
RUN set -eux; \
microdnf install -y ca-certificates gnupg openssl libcap tzdata procps shadow-utils util-linux tar
microdnf install -y ca-certificates gnupg openssl libcap tzdata procps shadow-utils util-linux tar bash
# Create a non-root user to run the software.
RUN groupadd --gid 1000 vault && \
@ -171,7 +171,7 @@ EXPOSE 8200
# For production derivatives of this container, you should add the IPC_LOCK
# capability so that Vault can mlock memory.
COPY .release/docker/ubi-docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
# Use the Vault user as the default user for starting this container.
USER ${NAME}
@ -188,7 +188,7 @@ FROM ubi AS ubi-hsm-fips
## Builder:
#
# A build container used to build the Vault binary. We use focal because the
# A build container used to build the Vault binary. We use noble because the
# version of glibc is old enough for all of our supported distros for editions
# that require CGO. This container is used in CI to build all binaries that
# require CGO.
@ -206,7 +206,7 @@ FROM ubi AS ubi-hsm-fips
# If you have a linux machine you can also share the tools
# GOBIN="$(go env GOPATH)/bin" make tools
# docker run -it -v $(pwd):/build -v $(go env GOMODCACHE):/go-mod-cache -v "$(go env GOPATH)/bin":/opt/tools/bin --env GITHUB_TOKEN=$GITHUB_TOKEN --env GO_TAGS='ui enterprise cgo hsm venthsm' --env GOARCH=s390x --env GOOS=linux --env VERSION=1.20.0-beta1 --env VERSION_METADATA=ent.hsm --env GOMODCACHE=/go-mod-cache --env CGO_ENABLED=1 builder make ci-build
FROM ubuntu:focal AS builder
FROM ubuntu:noble AS builder
# Pass in the GO_VERSION as a build-arg
ARG GO_VERSION

View file

@ -1,3 +1,28 @@
VAULT_VERSION := 0.0.0-dev-2
podman-push:
podman push quay.io/rhn-support-gong/vault:$(VAULT_VERSION)
dist/linux/amd64/vault:
mkdir -p dist/linux/amd64
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o dist/linux/amd64/vault .
.dev-licenses:
mkdir -p .dev-licenses
cp LICENSE .dev-licenses/
podman-build: dist/linux/amd64/vault .dev-licenses
podman build \
--platform linux/amd64 \
--target ubi \
--build-arg BIN_NAME=vault \
--build-arg NAME=vault \
--build-arg PRODUCT_VERSION=$(VAULT_VERSION) \
--build-arg LICENSE_SOURCE=.dev-licenses \
--build-arg LICENSE_DEST=/licenses \
-t quay.io/rhn-support-gong/vault:$(VAULT_VERSION) \
-f Dockerfile .
# Determine this makefile's path.
# Be sure to place this BEFORE `include` directives, if any.
THIS_FILE := $(lastword $(MAKEFILE_LIST))

View file

@ -59,7 +59,7 @@ EXPOSE 8200
# For production derivatives of this container, you should add the IPC_LOCK
# capability so that Vault can mlock memory.
COPY ./scripts/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
# Use the Vault user as the default user for starting this container.
USER vault