Skip to content

Commit

Permalink
Bump fabric-ca-fvt from debian buster to bullseye
Browse files Browse the repository at this point in the history
Bump fabric-ca-fvt from debian buster to bullseye,
required for getting to Go 1.21.

Requires updating to Postgress 13 and mysql 8.0.

Signed-off-by: David Enyeart <[email protected]>
  • Loading branch information
denyeart authored and David Enyeart committed Dec 7, 2023
1 parent 7d6126a commit 852d448
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ PLATFORM=$(shell go env GOOS)-$(shell go env GOARCH)
RELEASE_VERSION=$(shell echo $(BASE_VERSION) | sed -e 's/^v\(.*\)/\1/')
PROJECT_VERSION=${RELEASE_VERSION}

PG_VER=11
PG_VER=13

PKGNAME = github.com/hyperledger/$(PROJECT_NAME)

Expand Down
2 changes: 1 addition & 1 deletion docker-env.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ifneq ($(NO_PROXY),)
DOCKER_BUILD_FLAGS+=--build-arg NO_PROXY=$(NO_PROXY)
endif

DBUILD = docker build $(DOCKER_BUILD_FLAGS)
DBUILD = docker build --no-cache --progress=plain $(DOCKER_BUILD_FLAGS)

DOCKER_NS ?= hyperledger
DOCKER_TAG=$(ARCH)-$(PROJECT_VERSION)
Expand Down
4 changes: 2 additions & 2 deletions images/fabric-ca-fvt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
ARG GO_VER
FROM golang:${GO_VER}-buster as fabric-ca-builder
FROM golang:${GO_VER}-bullseye as fabric-ca-builder
ARG GO_LDFLAGS
ARG GO_TAGS

Expand All @@ -17,7 +17,7 @@ RUN go build -tags "${GO_TAGS}" -ldflags "${GO_LDFLAGS}" \
-o /usr/local/bin/fabric-ca-client \
github.com/hyperledger/fabric-ca/cmd/fabric-ca-client

FROM debian:buster-20210816-slim
FROM debian:bullseye-20230814-slim
ARG PG_VER

ENV PATH="/usr/local/go/bin/:${PATH}" \
Expand Down
18 changes: 11 additions & 7 deletions images/fabric-ca-fvt/payload/mysql_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ arch=$(uname -m)

export DEBIAN_FRONTEND=noninteractive

# Latest mysql version number can be found at https://dev.mysql.com/downloads/repo/apt/
echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | debconf-set-selections
wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb
dpkg -i mysql-apt-config_0.8.22-1_all.deb
# Latest mysql download can be found at https://dev.mysql.com/downloads/repo/apt/
# mysql versions and platform support can be found at http://repo.mysql.com/apt/debian/dists/bullseye/ (no arm support)
echo mysql-apt-config mysql-apt-config/select-server select mysql-8.0 | debconf-set-selections
wget https://dev.mysql.com/get/mysql-apt-config_0.8.28-1_all.deb
dpkg -i mysql-apt-config_0.8.28-1_all.deb
apt-get update
apt-get install mysql-server -y
service mysql start
mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mysql'"

mkdir -p /var/run/mysqld
chown mysql:mysql /var/run/mysqld
Expand All @@ -31,4 +30,9 @@ sed -i "s/^[[:blank:]]*#*[[:blank:]]*ssl-ca=.*/ssl-ca=$TLS_BUNDLE/;
s/^[[:blank:]]*#*[[:blank:]]*ssl-cert=.*/ssl-cert=$TLS_SERVER_CERT/;
s/^[[:blank:]]*#*[[:blank:]]*ssl-key=.*/ssl-key=$TLS_SERVER_KEY/" $MYCNF || let RC+=1
chown -R mysql.mysql $MYSQLDATA
exit $RC

/usr/bin/mysqld_safe --sql-mode=STRICT_TRANS_TABLES &
sleep 5
mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mysql'"

exit $RC

0 comments on commit 852d448

Please sign in to comment.