Skip to content

Commit

Permalink
Fix ipfs credential assign (#231)
Browse files Browse the repository at this point in the history
* Fix ipfs credential assign

* Update submodule
  • Loading branch information
waybackarchiver authored Oct 30, 2022
1 parent 046824c commit 0c7b047
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 2 deletions.
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

0 comments on commit 0c7b047

Please sign in to comment.