Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ipfs credential assign #231

Merged
merged 2 commits into from
Oct 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,15 @@ profile: ## Test and profile

docker-image: ## Build Docker image
@echo "-> Building docker image..."
@$(DOCKER) build -t $(DOCKER_IMAGE):$(VERSION) -f ./build/docker/Dockerfile.dev .
@$(DOCKER) build \
--build-arg WAYBACK_IPFS_APIKEY=$(shell echo ${WAYBACK_IPFS_APIKEY}) \
-t $(DOCKER_IMAGE):$(VERSION) \
-f ./build/docker/Dockerfile.dev .

rpm: ## Build RPM package
@echo "-> Building rpm package..."
@$(DOCKER) build \
--build-arg WAYBACK_IPFS_APIKEY=$(shell echo ${WAYBACK_IPFS_APIKEY}) \
-t wayback-rpm-builder \
-f build/redhat/Dockerfile .
@$(DOCKER) run --rm \
Expand All @@ -168,6 +172,7 @@ debian: ## Build Debian packages
--build-arg IMAGE_ARCH=$(DEB_IMG_ARCH) \
--build-arg PKG_VERSION=$(VERSION) \
--build-arg PKG_ARCH=$(PKG_ARCH) \
--build-arg WAYBACK_IPFS_APIKEY=$(shell echo ${WAYBACK_IPFS_APIKEY}) \
-t $(DEB_IMG_ARCH)/wayback-deb-builder \
-f build/debian/Dockerfile .
@$(DOCKER) run --rm \
Expand Down
2 changes: 1 addition & 1 deletion build/aur
Submodule aur updated 4 files
+1 −1 .SRCINFO
+4 −0 Dockerfile
+3 −2 Makefile
+1 −1 PKGBUILD
3 changes: 3 additions & 0 deletions build/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ FROM ${IMAGE_ARCH}/golang:buster AS build

ARG PKG_ARCH
ARG PKG_VERSION
ARG WAYBACK_IPFS_APIKEY
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update -q && \
Expand All @@ -15,6 +16,8 @@ RUN apt-get update -q && \
RUN mkdir -p /build/debian /pkg
COPY . /src
WORKDIR /src/build/debian

ENV WAYBACK_IPFS_APIKEY ${WAYBACK_IPFS_APIKEY}
ENV PKG_VERSION ${PKG_VERSION}
ENV PKG_ARCH ${PKG_ARCH}

Expand Down
4 changes: 4 additions & 0 deletions build/docker/Dockerfile.all
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ COPY --from=tonistiigi/xx:golang / /
RUN apk add --no-cache -U build-base ca-certificates linux-headers musl-dev git tar

ARG TARGETPLATFORM
ARG WAYBACK_IPFS_APIKEY

WORKDIR /src

ENV WAYBACK_IPFS_APIKEY $WAYBACK_IPFS_APIKEY

COPY . .
RUN --mount=type=bind,target=/src,rw \
--mount=type=cache,target=/root/.cache/go-build \
Expand Down
4 changes: 4 additions & 0 deletions build/docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS builder
RUN apk add --no-cache -U build-base ca-certificates linux-headers musl-dev git tar

ARG TARGETPLATFORM
ARG WAYBACK_IPFS_APIKEY

WORKDIR /src

ENV WAYBACK_IPFS_APIKEY $WAYBACK_IPFS_APIKEY

COPY . .
RUN set -eu && \
sh ./build/binary.sh $TARGETPLATFORM \
Expand Down
4 changes: 4 additions & 0 deletions build/redhat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
#
FROM golang:1.19-alpine AS builder

ARG WAYBACK_IPFS_APIKEY

RUN apk update && apk add --no-cache build-base ca-certificates git
# Required by statically linked binary with OpenSSL
# RUN apk add linux-headers

ENV WAYBACK_IPFS_APIKEY ${WAYBACK_IPFS_APIKEY}

WORKDIR /go/src/app
COPY . .
RUN make linux-amd64
Expand Down