Skip to content

Commit

Permalink
Fix Docker build warnings
Browse files Browse the repository at this point in the history
Fixes #142

Signed-off-by: James Taylor <[email protected]>
  • Loading branch information
jt-nti committed Nov 5, 2024
1 parent 58427f1 commit 01ab275
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG UBUNTU_VER=20.04
ARG HLF_VERSION=2.5

FROM ubuntu:${UBUNTU_VER} as build
FROM ubuntu:${UBUNTU_VER} AS build
ARG GO_VER=1.22.0
ENV GOPATH /go
ENV GOPATH=/go

RUN apt update && apt install -y \
git \
Expand All @@ -19,7 +19,7 @@ WORKDIR $GOPATH/src/github.com/hyperledger-labs/fabric-builder-k8s

RUN go install ./cmd/...

FROM hyperledger/fabric-peer:${HLF_VERSION} as core
FROM hyperledger/fabric-peer:${HLF_VERSION} AS core

RUN apt update && apt install -y \
wget
Expand All @@ -30,9 +30,9 @@ RUN yq 'del(.vm.endpoint) | .chaincode.externalBuilders += { "name": "k8s_builde

FROM hyperledger/fabric-peer:${HLF_VERSION}

LABEL org.opencontainers.image.title "K8s Hyperledger Fabric Peer"
LABEL org.opencontainers.image.description "Hyperledger Fabric Peer with a preconfigured Kubernetes chaincode builder"
LABEL org.opencontainers.image.source "https://github.com/hyperledger-labs/fabric-builder-k8s"
LABEL org.opencontainers.image.title="K8s Hyperledger Fabric Peer"
LABEL org.opencontainers.image.description="Hyperledger Fabric Peer with a preconfigured Kubernetes chaincode builder"
LABEL org.opencontainers.image.source="https://github.com/hyperledger-labs/fabric-builder-k8s"

COPY --from=core core.yaml ${FABRIC_CFG_PATH}
COPY --from=build /go/bin/ /opt/hyperledger/k8s_builder/bin/
8 changes: 4 additions & 4 deletions samples/go-contract/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ARG GO_VER=1.22.0
ARG ALPINE_VER=3.19

FROM golang:${GO_VER}-alpine${ALPINE_VER} as build
FROM golang:${GO_VER}-alpine${ALPINE_VER} AS build

RUN apk add --no-cache \
bash \
Expand All @@ -21,9 +21,9 @@ RUN go install ./...

FROM golang:${GO_VER}-alpine${ALPINE_VER}

LABEL org.opencontainers.image.title "Sample Go Contract"
LABEL org.opencontainers.image.description "Sample Hyperledger Fabric Go contract for Kubernetes chaincode builder"
LABEL org.opencontainers.image.source "https://github.com/hyperledger-labs/fabric-builder-k8s/samples/go-contract"
LABEL org.opencontainers.image.title="Sample Go Contract"
LABEL org.opencontainers.image.description="Sample Hyperledger Fabric Go contract for Kubernetes chaincode builder"
LABEL org.opencontainers.image.source="https://github.com/hyperledger-labs/fabric-builder-k8s/samples/go-contract"

COPY --from=build /usr/bin/dumb-init /usr/bin/dumb-init
COPY --from=build /go/bin/go-contract /usr/bin/go-contract
Expand Down
8 changes: 4 additions & 4 deletions samples/java-contract/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ARG JAVA_VER=11

FROM eclipse-temurin:${JAVA_VER}-jdk-alpine as build
FROM eclipse-temurin:${JAVA_VER}-jdk-alpine AS build

RUN apk add --no-cache \
dumb-init
Expand All @@ -19,9 +19,9 @@ RUN ./gradlew jar

FROM eclipse-temurin:${JAVA_VER}-jre-alpine

LABEL org.opencontainers.image.title "Sample Java Contract"
LABEL org.opencontainers.image.description "Sample Hyperledger Fabric Java contract for Kubernetes chaincode builder"
LABEL org.opencontainers.image.source "https://github.com/hyperledger-labs/fabric-builder-k8s/samples/java-contract"
LABEL org.opencontainers.image.title="Sample Java Contract"
LABEL org.opencontainers.image.description="Sample Hyperledger Fabric Java contract for Kubernetes chaincode builder"
LABEL org.opencontainers.image.source="https://github.com/hyperledger-labs/fabric-builder-k8s/samples/java-contract"

WORKDIR /var/hyperledger/java-contract

Expand Down
8 changes: 4 additions & 4 deletions samples/node-contract/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
ARG NODE_VER=16
ARG ALPINE_VER=3.14

FROM node:${NODE_VER}-alpine${ALPINE_VER} as build
FROM node:${NODE_VER}-alpine${ALPINE_VER} AS build

RUN apk add --no-cache \
dumb-init

FROM node:${NODE_VER}-alpine${ALPINE_VER}

LABEL org.opencontainers.image.title "Sample Node Contract"
LABEL org.opencontainers.image.description "Sample Hyperledger Fabric Node contract for Kubernetes chaincode builder"
LABEL org.opencontainers.image.source "https://github.com/hyperledger-labs/fabric-builder-k8s/samples/node-contract"
LABEL org.opencontainers.image.title="Sample Node Contract"
LABEL org.opencontainers.image.description="Sample Hyperledger Fabric Node contract for Kubernetes chaincode builder"
LABEL org.opencontainers.image.source="https://github.com/hyperledger-labs/fabric-builder-k8s/samples/node-contract"

COPY --from=build /usr/bin/dumb-init /usr/bin/dumb-init

Expand Down

0 comments on commit 01ab275

Please sign in to comment.