diff --git a/README.md b/README.md index f598ad11..b95d9aef 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,6 @@ Check the [docs](docs/Deployments.md) for more documentation on the deployments. - [Address Resolver](cmd/address-resolver/README.md) - [Config Bootstrapper](cmd/config-bootstrapper/README.md) -- [Liveness Checker](cmd/liveness-checker/README.md) - [Network Monitor](cmd/network-monitor/README.md) - [Public Visor Monitor](cmd/public-visor-monitor/README.md) - [Route Finder](cmd/route-finder/README.md) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index c6cba1b0..93930f04 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.7" - networks: srv: driver: "bridge" diff --git a/docker/docker_build.sh b/docker/docker_build.sh index 1009038b..05e21c92 100755 --- a/docker/docker_build.sh +++ b/docker/docker_build.sh @@ -4,6 +4,7 @@ trap "exit" INT ## Variables image_tag="$1" go_buildopts="$2" +build_arch="$3" git_branch="$(git rev-parse --abbrev-ref HEAD)" nv_dev_url="https://nv.skywire.dev/map" nv_prod_url="https://nv.skycoin.com/map" @@ -15,7 +16,7 @@ platform="--platform=linux/amd64" registry="$REGISTRY" # shellcheck disable=SC2153 -base_image=golang:1.21-alpine +base_image=golang:1.23-alpine if [[ "$#" != 2 ]]; then echo "docker_build.sh " @@ -25,6 +26,10 @@ if [[ "$go_buildopts" == "" ]]; then go_buildopts="-mod=vendor -ldflags\"-w -s\"" fi +if [[ "$build_arch" != "" ]]; then + platform="--platform=$build_arch" +fi + if [[ "$git_branch" != "master" ]] && [[ "$git_branch" != "develop" ]]; then git_branch="develop" fi @@ -65,6 +70,7 @@ if [[ "$image_tag" == "e2e" ]]; then --build-arg build_opts="$go_buildopts" \ --build-arg image_tag="$image_tag" \ --build-arg base_image="skycoin/dmsg-discovery:$dockerhub_image_tag" \ + $platform \ -t "$registry"/dmsg-discovery:"$image_tag" . echo "build dmsg server image" @@ -72,6 +78,7 @@ if [[ "$image_tag" == "e2e" ]]; then --build-arg base_image="skycoin/dmsg-server:$dockerhub_image_tag" \ --build-arg build_opts="$go_buildopts" \ --build-arg image_tag="$image_tag" \ + $platform \ -t "$registry"/dmsg-server:"$image_tag" . echo "build service discovery image" @@ -81,13 +88,6 @@ if [[ "$image_tag" == "e2e" ]]; then --build-arg image_tag="$image_tag" \ $platform \ -t "$registry"/service-discovery:"$image_tag" . - - echo "building uptime tracker image" - DOCKER_BUILDKIT="$bldkit" docker build -f docker/images/uptime-tracker/Dockerfile \ - --build-arg base_image="$base_image" \ - --build-arg build_opts="$go_buildopts" \ - --build-arg image_tag="$image_tag" \ - -t "$registry"/uptime-tracker:"$image_tag" . rm -rf ./tmp/skycoin-service-discovery fi @@ -97,26 +97,27 @@ if [[ "$image_tag" == "integration" ]]; then rm -rf ./tmp/skycoin-service-discovery rm -rf ./tmp/dmsg rm -rf ./tmp/skywire - rm -rf ./tmp/skywire-ut cp -r ../skycoin-service-discovery ./tmp cp -r ../dmsg ./tmp cp -r ../skywire ./tmp - cp -r ../skywire-ut ./tmp echo ==================================================== echo "BUILDING SKYWIRE VISOR" DOCKER_BUILDKIT="$bldkit" docker build -f docker/images/skywire-visor/DockerfileInt \ + $platform \ -t "$registry"/skywire-visor:"$image_tag" . echo ============ Base images ready ====================== echo "build dmsg discovery image" DOCKER_BUILDKIT="$bldkit" docker build -f docker/images/dmsg-discovery/DockerfileInt \ + $platform \ -t "$registry"/dmsg-discovery:"$image_tag" . echo "build dmsg server image" DOCKER_BUILDKIT="$bldkit" docker build -f docker/images/dmsg-server/DockerfileInt \ + $platform \ -t "$registry"/dmsg-server:"$image_tag" . echo "build service discovery image" @@ -124,14 +125,8 @@ if [[ "$image_tag" == "integration" ]]; then --build-arg base_image="$base_image" \ --build-arg build_opts="$go_buildopts" \ --build-arg image_tag="$image_tag" \ + $platform \ -t "$registry"/service-discovery:"$image_tag" . - - echo "building uptime tracker image" - DOCKER_BUILDKIT="$bldkit" docker build -f docker/images/uptime-tracker/Dockerfile \ - --build-arg base_image="$base_image" \ - --build-arg build_opts="$go_buildopts" \ - --build-arg image_tag="$image_tag" \ - -t "$registry"/uptime-tracker:"$image_tag" . rm -rf ./tmp/* fi @@ -176,7 +171,6 @@ DOCKER_BUILDKIT="$bldkit" docker build -f docker/images/uptime-tracker/Dockerfil $platform \ -t "$registry"/uptime-tracker:"$image_tag" . - echo "build node visualizer image" DOCKER_BUILDKIT="$bldkit" docker build -f docker/images/node-visualizer/Dockerfile \ --build-arg base_image="$base_image" \ @@ -193,14 +187,6 @@ DOCKER_BUILDKIT="$bldkit" docker build -f docker/images/network-monitor/Dockerfi $platform \ -t "$registry"/network-monitor:"$image_tag" . -echo "building liveness checker image" -DOCKER_BUILDKIT="$bldkit" docker build -f docker/images/liveness-checker/Dockerfile \ - --build-arg base_image="$base_image" \ - --build-arg build_opts="$go_buildopts" \ - --build-arg image_tag="$image_tag" \ - $platform \ - -t "$registry"/liveness-checker:"$image_tag" . - echo "building config bootstrapper image" DOCKER_BUILDKIT="$bldkit" docker build -f docker/images/config-bootstrapper/Dockerfile \ --build-arg base_image="$base_image" \ diff --git a/docker/docker_clean.sh b/docker/docker_clean.sh index 18dbf62f..9e950115 100755 --- a/docker/docker_clean.sh +++ b/docker/docker_clean.sh @@ -19,7 +19,6 @@ declare -a images_arr=( "skycoin/network-monitor:${image_tag}" "skycoin/node-visualizer:${image_tag}" "skycoin/config-bootstrapper:${image_tag}" - "skycoin/liveness-checker:${image_tag}" "skycoin/vpn-monitor:${image_tag}" "skycoin/public-visor-monitor:${image_tag}" "skycoin/dmsg-monitor:${image_tag}" diff --git a/docker/docker_push.sh b/docker/docker_push.sh index c565a9dc..ef4018ee 100755 --- a/docker/docker_push.sh +++ b/docker/docker_push.sh @@ -23,7 +23,6 @@ declare -a images_arr=( "network-monitor" "node-visualizer" "config-bootstrapper" - "liveness-checker" "vpn-monitor" "public-visor-monitor" "dmsg-monitor" diff --git a/docker/images/address-resolver/Dockerfile b/docker/images/address-resolver/Dockerfile index 197b792f..906fa29a 100755 --- a/docker/images/address-resolver/Dockerfile +++ b/docker/images/address-resolver/Dockerfile @@ -1,7 +1,7 @@ ARG base_image ARG image_tag -FROM ${base_image} as builder +FROM ${base_image} AS builder ARG build_opts @@ -12,14 +12,14 @@ RUN go build "${build_opts}" -o /release/address-resolver \ ./cmd/address-resolver -FROM alpine as prod +FROM alpine AS prod COPY --from=builder /release/address-resolver /release/address-resolver ENTRYPOINT ["/release/address-resolver"] -FROM prod as test +FROM prod AS test # OS image -FROM alpine as e2e +FROM alpine AS e2e COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh RUN sh -c /release/install-prequisites.sh cert-only \ @@ -28,6 +28,6 @@ RUN sh -c /release/install-prequisites.sh cert-only \ COPY --from=builder /release/address-resolver /release/address-resolver ENTRYPOINT ["/release/address-resolver"] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/docker/images/config-bootstrapper/Dockerfile b/docker/images/config-bootstrapper/Dockerfile index 9e677200..f8a5997c 100644 --- a/docker/images/config-bootstrapper/Dockerfile +++ b/docker/images/config-bootstrapper/Dockerfile @@ -1,7 +1,7 @@ ARG image_tag ARG base_image -FROM ${base_image} as builder +FROM ${base_image} AS builder ARG build_opts @@ -11,15 +11,15 @@ WORKDIR /skywire-services RUN go build "${build_opts}" -o /release/config-bootstrapper ./cmd/config-bootstrapper && \ mv /skywire-services/docker/config/config.json /release/config.json -FROM alpine as prod +FROM alpine AS prod COPY --from=builder /release/config-bootstrapper /release/config-bootstrapper COPY --from=builder /release/config.json /release/config.json ENTRYPOINT ["/release/config-bootstrapper"] -FROM prod as test +FROM prod AS test # OS image -FROM alpine as e2e +FROM alpine AS e2e COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh RUN sh -c /release/install-prequisites.sh cert-only \ @@ -29,6 +29,6 @@ COPY --from=builder /release/config-bootstrapper /release/config-bootstrapper COPY --from=builder /release/config.json /release/config.json ENTRYPOINT ["/release/config-bootstrapper"] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/docker/images/dmsg-discovery/Dockerfile b/docker/images/dmsg-discovery/Dockerfile index ecdab041..47974e49 100644 --- a/docker/images/dmsg-discovery/Dockerfile +++ b/docker/images/dmsg-discovery/Dockerfile @@ -1,10 +1,10 @@ ARG image_tag ARG base_image -FROM ${base_image} as prod +FROM ${base_image} AS prod -FROM ${base_image} as test +FROM ${base_image} AS test # OS image -FROM ${base_image} as e2e +FROM ${base_image} AS e2e FROM ${image_tag} diff --git a/docker/images/dmsg-discovery/DockerfileInt b/docker/images/dmsg-discovery/DockerfileInt index 27f5e1d5..edee7bd8 100644 --- a/docker/images/dmsg-discovery/DockerfileInt +++ b/docker/images/dmsg-discovery/DockerfileInt @@ -1,9 +1,7 @@ -FROM golang:1.21-alpine AS builder +FROM golang:1.23-alpine AS builder ARG CGO_ENABLED=0 ENV CGO_ENABLED=${CGO_ENABLED} \ - GOOS=linux \ - GOARCH=amd64 \ GO111MODULE=on COPY /tmp/dmsg /dmsg diff --git a/docker/images/dmsg-monitor/Dockerfile b/docker/images/dmsg-monitor/Dockerfile index 85847326..ae9bdb21 100644 --- a/docker/images/dmsg-monitor/Dockerfile +++ b/docker/images/dmsg-monitor/Dockerfile @@ -1,7 +1,7 @@ ARG image_tag ARG base_image -FROM ${base_image} as builder +FROM ${base_image} AS builder ARG build_opts @@ -10,16 +10,16 @@ WORKDIR /skywire-services RUN go build "${build_opts}" -o /release/dmsg-monitor ./cmd/dmsg-monitor -FROM alpine as prod +FROM alpine AS prod WORKDIR /release COPY --from=builder /release/dmsg-monitor /release/dmsg-monitor ENTRYPOINT ["/release/dmsg-monitor"] -FROM prod as test +FROM prod AS test # OS image -FROM alpine as e2e +FROM alpine AS e2e WORKDIR /release COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh @@ -29,6 +29,6 @@ RUN sh -c /release/install-prequisites.sh cert-only \ COPY --from=builder /release/dmsg-monitor /release/dmsg-monitor ENTRYPOINT ["/release/dmsg-monitor"] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/docker/images/dmsg-server/Dockerfile b/docker/images/dmsg-server/Dockerfile index ecdab041..47974e49 100644 --- a/docker/images/dmsg-server/Dockerfile +++ b/docker/images/dmsg-server/Dockerfile @@ -1,10 +1,10 @@ ARG image_tag ARG base_image -FROM ${base_image} as prod +FROM ${base_image} AS prod -FROM ${base_image} as test +FROM ${base_image} AS test # OS image -FROM ${base_image} as e2e +FROM ${base_image} AS e2e FROM ${image_tag} diff --git a/docker/images/dmsg-server/DockerfileInt b/docker/images/dmsg-server/DockerfileInt index b00c6b60..1a7f3f94 100644 --- a/docker/images/dmsg-server/DockerfileInt +++ b/docker/images/dmsg-server/DockerfileInt @@ -1,9 +1,7 @@ -FROM golang:1.21-alpine AS builder +FROM golang:1.23-alpine AS builder ARG CGO_ENABLED=0 ENV CGO_ENABLED=${CGO_ENABLED} \ - GOOS=linux \ - GOARCH=amd64 \ GO111MODULE=on COPY /tmp/dmsg /dmsg diff --git a/docker/images/liveness-checker/Dockerfile b/docker/images/liveness-checker/Dockerfile deleted file mode 100644 index 639c1f35..00000000 --- a/docker/images/liveness-checker/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -ARG image_tag -ARG base_image - -FROM ${base_image} as builder - -ARG build_opts - -COPY . /skywire-services -WORKDIR /skywire-services - -RUN go build "${build_opts}" -o /release/liveness-checker ./cmd/liveness-checker && \ - go build "${build_opts}" -o /release/vpn-client ./cmd/vpn-lite-client && \ - mv /skywire-services/docker/config/liveness-checker.json /release/liveness-checker.json - -FROM alpine as prod -COPY --from=builder /release/vpn-client /apps/vpn-client -COPY --from=builder /release/liveness-checker /release/liveness-checker -COPY --from=builder /release/liveness-checker.json /release/liveness-checker.json -ENTRYPOINT ["/release/liveness-checker"] - -FROM prod as test - -# OS image -FROM alpine as e2e -WORKDIR /release - -COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh -RUN sh -c /release/install-prequisites.sh cert-only \ - && rm -rf /release/install-prequisites.sh - -COPY --from=builder /release/vpn-client /release/vpn-client -COPY --from=builder /release/liveness-checker /release/liveness-checker -COPY --from=builder /release/liveness-checker.json /release/liveness-checker.json -ENTRYPOINT ["/release/liveness-checker"] - -FROM e2e as integration - -FROM ${image_tag} diff --git a/docker/images/network-monitor/Dockerfile b/docker/images/network-monitor/Dockerfile index 459d346d..a4913d38 100644 --- a/docker/images/network-monitor/Dockerfile +++ b/docker/images/network-monitor/Dockerfile @@ -1,7 +1,7 @@ ARG image_tag ARG base_image -FROM ${base_image} as builder +FROM ${base_image} AS builder ARG build_opts @@ -11,16 +11,16 @@ WORKDIR /skywire-services RUN go build "${build_opts}" -o /release/network-monitor ./cmd/network-monitor && \ go build "${build_opts}" -o /release/vpn-client ./cmd/vpn-lite-client -FROM alpine as prod +FROM alpine AS prod WORKDIR /release COPY --from=builder /release/vpn-client /apps/vpn-client COPY --from=builder /release/network-monitor /release/network-monitor ENTRYPOINT ["/release/network-monitor"] -FROM prod as test +FROM prod AS test # OS image -FROM alpine as e2e +FROM alpine AS e2e WORKDIR /release COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh @@ -31,6 +31,6 @@ COPY --from=builder /release/vpn-client /release/vpn-client COPY --from=builder /release/network-monitor /release/network-monitor ENTRYPOINT ["/release/network-monitor"] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/docker/images/node-visualizer/Dockerfile b/docker/images/node-visualizer/Dockerfile index 377e34a4..ea330646 100644 --- a/docker/images/node-visualizer/Dockerfile +++ b/docker/images/node-visualizer/Dockerfile @@ -1,7 +1,7 @@ ARG image_tag ARG base_image -FROM ${base_image} as builder +FROM ${base_image} AS builder ARG build_opts # COPY . /skywire-services @@ -10,14 +10,14 @@ WORKDIR /skywire-services RUN go build "${build_opts}" -o /release/node-visualizer ./cmd/node-visualizer -FROM alpine as prod +FROM alpine AS prod COPY --from=builder /release/node-visualizer /release/node-visualizer ENTRYPOINT ["/release/node-visualizer"] -FROM prod as test +FROM prod AS test # OS image -FROM alpine as e2e +FROM alpine AS e2e COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh RUN sh -c /release/install-prequisites.sh cert-only \ && rm -rf /release/install-prequisites.sh @@ -25,6 +25,6 @@ RUN sh -c /release/install-prequisites.sh cert-only \ COPY --from=builder /release/node-visualizer /release/node-visualizer ENTRYPOINT ["/release/node-visualizer"] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/docker/images/public-visor-monitor/Dockerfile b/docker/images/public-visor-monitor/Dockerfile index 972a6098..6581b690 100644 --- a/docker/images/public-visor-monitor/Dockerfile +++ b/docker/images/public-visor-monitor/Dockerfile @@ -1,7 +1,7 @@ ARG image_tag ARG base_image -FROM ${base_image} as builder +FROM ${base_image} AS builder ARG build_opts @@ -10,14 +10,14 @@ WORKDIR /skywire-services RUN go build "${build_opts}" -o /release/public-visor-monitor ./cmd/public-visor-monitor -FROM alpine as prod +FROM alpine AS prod COPY --from=builder /release/public-visor-monitor /release/public-visor-monitor ENTRYPOINT ["/release/public-visor-monitor"] -FROM prod as test +FROM prod AS test # OS image -FROM alpine as e2e +FROM alpine AS e2e WORKDIR /release COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh @@ -27,6 +27,6 @@ RUN sh -c /release/install-prequisites.sh cert-only \ COPY --from=builder /release/public-visor-monitor /release/public-visor-monitor ENTRYPOINT ["/release/public-visor-monitor"] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/docker/images/route-finder/Dockerfile b/docker/images/route-finder/Dockerfile index a1ac9875..e98c1224 100755 --- a/docker/images/route-finder/Dockerfile +++ b/docker/images/route-finder/Dockerfile @@ -1,7 +1,7 @@ ARG image_tag ARG base_image -FROM ${base_image} as builder +FROM ${base_image} AS builder ARG build_opts COPY . /skywire-services @@ -9,14 +9,14 @@ WORKDIR /skywire-services RUN go build "${build_opts}" -o /release/route-finder ./cmd/route-finder -FROM alpine as prod +FROM alpine AS prod COPY --from=builder /release/route-finder /release/route-finder ENTRYPOINT ["/release/route-finder"] -FROM prod as test +FROM prod AS test # OS image -FROM alpine as e2e +FROM alpine AS e2e COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh RUN sh -c /release/install-prequisites.sh cert-only \ && rm -rf /release/install-prequisites.sh @@ -24,6 +24,6 @@ RUN sh -c /release/install-prequisites.sh cert-only \ COPY --from=builder /release/route-finder /release/route-finder ENTRYPOINT ["/release/route-finder"] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/docker/images/service-discovery/Dockerfile b/docker/images/service-discovery/Dockerfile index 70b70018..07589f19 100644 --- a/docker/images/service-discovery/Dockerfile +++ b/docker/images/service-discovery/Dockerfile @@ -1,7 +1,7 @@ ARG image_tag ARG base_image -FROM ${base_image} as service-discovery-build +FROM ${base_image} AS service-discovery-build ARG build_opts RUN apk --no-cache add bash curl @@ -20,7 +20,7 @@ WORKDIR /skycoin-service-discovery RUN go build "${build_opts}" -o /release/service-discovery ./cmd/service-discovery -FROM alpine as prod +FROM alpine AS prod COPY --from=service-discovery-build /install-prequisites.sh /release/install-prequisites.sh RUN sh -c /release/install-prequisites.sh cert-only \ @@ -30,9 +30,9 @@ COPY --from=service-discovery-build /release/* /release/ WORKDIR /release ENTRYPOINT [ "/release/service-discovery" ] -FROM prod as test +FROM prod AS test -FROM alpine as e2e +FROM alpine AS e2e COPY --from=service-discovery-build /install-prequisites.sh /release/install-prequisites.sh RUN sh -c /release/install-prequisites.sh cert-only \ @@ -42,6 +42,6 @@ COPY --from=service-discovery-build /release /release WORKDIR /release ENTRYPOINT [ "/release/service-discovery" ] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/docker/images/setup-node/Dockerfile b/docker/images/setup-node/Dockerfile index 63195042..4ed77565 100755 --- a/docker/images/setup-node/Dockerfile +++ b/docker/images/setup-node/Dockerfile @@ -1,7 +1,7 @@ ARG image_tag ARG base_image -FROM ${base_image} as builder +FROM ${base_image} AS builder ARG build_opts @@ -11,17 +11,17 @@ WORKDIR /skywire-services RUN go build "${build_opts}" -o /release/setup-node ./cmd/setup-node && \ mv ./docker/config/setup-node.json /release/setup-node.json -FROM alpine as prod +FROM alpine AS prod WORKDIR /release COPY --from=builder /release/setup-node /release/setup-node COPY --from=builder /release/setup-node.json /release/setup-node.json ENTRYPOINT ["/release/setup-node"] -FROM prod as test +FROM prod AS test # OS image -FROM alpine as e2e +FROM alpine AS e2e WORKDIR /release COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh @@ -32,6 +32,6 @@ COPY --from=builder /release/setup-node /release/setup-node COPY --from=builder /release/setup-node.json /release/setup-node.json ENTRYPOINT ["/release/setup-node"] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/docker/images/skysocks-monitor/Dockerfile b/docker/images/skysocks-monitor/Dockerfile index a894590d..ffb70c02 100644 --- a/docker/images/skysocks-monitor/Dockerfile +++ b/docker/images/skysocks-monitor/Dockerfile @@ -1,7 +1,7 @@ ARG image_tag ARG base_image -FROM ${base_image} as builder +FROM ${base_image} AS builder ARG build_opts @@ -11,15 +11,15 @@ WORKDIR /skywire-services RUN go build "${build_opts}" -o /release/skysocks-monitor ./cmd/skysocks-monitor && \ go build "${build_opts}" -o /release/skysocks-client ./cmd/skysocks-lite-client -FROM alpine as prod +FROM alpine AS prod COPY --from=builder /release/skysocks-client /apps/skysocks-client COPY --from=builder /release/skysocks-monitor /release/skysocks-monitor ENTRYPOINT ["/release/skysocks-monitor"] -FROM prod as test +FROM prod AS test # OS image -FROM alpine as e2e +FROM alpine AS e2e WORKDIR /release COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh @@ -30,6 +30,6 @@ COPY --from=builder /release/skysocks-client /release/skysocks-client COPY --from=builder /release/skysocks-monitor /release/skysocks-monitor ENTRYPOINT ["/release/skysocks-monitor"] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/docker/images/skywire-visor/Dockerfile b/docker/images/skywire-visor/Dockerfile index ed5b3e1e..1f414935 100755 --- a/docker/images/skywire-visor/Dockerfile +++ b/docker/images/skywire-visor/Dockerfile @@ -1,7 +1,7 @@ ARG image_tag=e2e ARG base=alpine -FROM golang:1.21-alpine as builder +FROM golang:1.23-alpine AS builder ARG BUILDINFO_LDFLAGS ARG CGO_ENABLED=0 @@ -33,10 +33,10 @@ STOPSIGNAL SIGINT ENTRYPOINT [ "/release/skywire" ] # default target -FROM visor-runner as prod +FROM visor-runner AS prod -FROM visor-runner as test +FROM visor-runner AS test -FROM visor-runner as e2e +FROM visor-runner AS e2e FROM ${image_tag} diff --git a/docker/images/skywire-visor/DockerfileInt b/docker/images/skywire-visor/DockerfileInt index b1022e56..10e68f7e 100644 --- a/docker/images/skywire-visor/DockerfileInt +++ b/docker/images/skywire-visor/DockerfileInt @@ -1,7 +1,7 @@ ARG image_tag=e2e ARG base=alpine -FROM golang:1.21-alpine as builder +FROM golang:1.23-alpine AS builder ARG BUILDINFO_LDFLAGS ARG CGO_ENABLED=0 @@ -31,12 +31,12 @@ STOPSIGNAL SIGINT ENTRYPOINT [ "/release/skywire" ] # default target -FROM visor-runner as prod +FROM visor-runner AS prod -FROM visor-runner as test +FROM visor-runner AS test -FROM visor-runner as e2e +FROM visor-runner AS e2e -FROM visor-runner as integration +FROM visor-runner AS integration FROM ${image_tag} diff --git a/docker/images/tpd-monitor/Dockerfile b/docker/images/tpd-monitor/Dockerfile index c3930902..76421d65 100644 --- a/docker/images/tpd-monitor/Dockerfile +++ b/docker/images/tpd-monitor/Dockerfile @@ -1,7 +1,7 @@ ARG image_tag ARG base_image -FROM ${base_image} as builder +FROM ${base_image} AS builder ARG build_opts @@ -10,14 +10,14 @@ WORKDIR /skywire-services RUN go build "${build_opts}" -o /release/tpd-monitor ./cmd/tpd-monitor -FROM alpine as prod +FROM alpine AS prod COPY --from=builder /release/tpd-monitor /release/tpd-monitor ENTRYPOINT ["/release/tpd-monitor"] -FROM prod as test +FROM prod AS test # OS image -FROM alpine as e2e +FROM alpine AS e2e WORKDIR /release COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh @@ -27,6 +27,6 @@ RUN sh -c /release/install-prequisites.sh cert-only \ COPY --from=builder /release/tpd-monitor /release/tpd-monitor ENTRYPOINT ["/release/tpd-monitor"] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/docker/images/transport-discovery/Dockerfile b/docker/images/transport-discovery/Dockerfile index 4cccb596..57f19c3b 100755 --- a/docker/images/transport-discovery/Dockerfile +++ b/docker/images/transport-discovery/Dockerfile @@ -1,7 +1,7 @@ ARG base_image ARG image_tag -FROM ${base_image} as builder +FROM ${base_image} AS builder ARG build_opts @@ -12,14 +12,14 @@ RUN go build "${build_opts}" -o /release/transport-discovery \ ./cmd/transport-discovery -FROM alpine as prod +FROM alpine AS prod COPY --from=builder /release/transport-discovery /release/transport-discovery ENTRYPOINT ["/release/transport-discovery"] -FROM prod as test +FROM prod AS test # OS image -FROM alpine as e2e +FROM alpine AS e2e COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh RUN sh -c /release/install-prequisites.sh cert-only \ @@ -28,6 +28,6 @@ RUN sh -c /release/install-prequisites.sh cert-only \ COPY --from=builder /release/transport-discovery /release/transport-discovery ENTRYPOINT ["/release/transport-discovery"] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/docker/images/transport-setup/Dockerfile b/docker/images/transport-setup/Dockerfile index 17cc95b7..0065edcc 100755 --- a/docker/images/transport-setup/Dockerfile +++ b/docker/images/transport-setup/Dockerfile @@ -1,7 +1,7 @@ ARG image_tag ARG base_image -FROM ${base_image} as builder +FROM ${base_image} AS builder ARG build_opts @@ -11,17 +11,17 @@ WORKDIR /skywire-services RUN go build "${build_opts}" -o /release/transport-setup ./cmd/transport-setup && \ mv ./docker/config/transport-setup.json /release/transport-setup.json -FROM alpine as prod +FROM alpine AS prod WORKDIR /release COPY --from=builder /release/transport-setup /release/transport-setup COPY --from=builder /release/transport-setup.json /release/transport-setup.json ENTRYPOINT ["/release/transport-setup"] -FROM prod as test +FROM prod AS test # OS image -FROM alpine as e2e +FROM alpine AS e2e WORKDIR /release COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh @@ -32,6 +32,6 @@ COPY --from=builder /release/transport-setup /release/transport-setup COPY --from=builder /release/transport-setup.json /release/transport-setup.json ENTRYPOINT ["/release/transport-setup"] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/docker/images/uptime-tracker/Dockerfile b/docker/images/uptime-tracker/Dockerfile index 02930b00..9f0fa6b0 100644 --- a/docker/images/uptime-tracker/Dockerfile +++ b/docker/images/uptime-tracker/Dockerfile @@ -1,7 +1,7 @@ ARG base_image ARG image_tag -FROM ${base_image} as builder +FROM ${base_image} AS builder ARG build_opts @@ -12,14 +12,14 @@ RUN go build "${build_opts}" -o /release/uptime-tracker \ ./cmd/uptime-tracker -FROM alpine as prod +FROM alpine AS prod COPY --from=builder /release/uptime-tracker /release/uptime-tracker ENTRYPOINT ["/release/uptime-tracker"] -FROM prod as test +FROM prod AS test # OS image -FROM alpine as e2e +FROM alpine AS e2e COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh RUN sh -c /release/install-prequisites.sh cert-only \ @@ -28,6 +28,6 @@ RUN sh -c /release/install-prequisites.sh cert-only \ COPY --from=builder /release/uptime-tracker /release/uptime-tracker ENTRYPOINT ["/release/uptime-tracker"] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/docker/images/vpn-monitor/Dockerfile b/docker/images/vpn-monitor/Dockerfile index 5f110e1e..289dd090 100644 --- a/docker/images/vpn-monitor/Dockerfile +++ b/docker/images/vpn-monitor/Dockerfile @@ -1,7 +1,7 @@ ARG image_tag ARG base_image -FROM ${base_image} as builder +FROM ${base_image} AS builder ARG build_opts @@ -11,15 +11,15 @@ WORKDIR /skywire-services RUN go build "${build_opts}" -o /release/vpn-monitor ./cmd/vpn-monitor && \ go build "${build_opts}" -o /release/vpn-client ./cmd/vpn-lite-client -FROM alpine as prod +FROM alpine AS prod COPY --from=builder /release/vpn-client /apps/vpn-client COPY --from=builder /release/vpn-monitor /release/vpn-monitor ENTRYPOINT ["/release/vpn-monitor"] -FROM prod as test +FROM prod AS test # OS image -FROM alpine as e2e +FROM alpine AS e2e WORKDIR /release COPY ./docker/common/install-prequisites.sh /release/install-prequisites.sh @@ -30,6 +30,6 @@ COPY --from=builder /release/vpn-client /release/vpn-client COPY --from=builder /release/vpn-monitor /release/vpn-monitor ENTRYPOINT ["/release/vpn-monitor"] -FROM e2e as integration +FROM e2e AS integration FROM ${image_tag} diff --git a/vendor/github.com/jaypipes/ghw/Dockerfile b/vendor/github.com/jaypipes/ghw/Dockerfile index ee5d2761..fcd46c18 100644 --- a/vendor/github.com/jaypipes/ghw/Dockerfile +++ b/vendor/github.com/jaypipes/ghw/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21-buster as builder +FROM golang:1.21-buster AS builder WORKDIR /go/src/github.com/jaypipes/ghw ENV GOPROXY=direct