Skip to content

Commit da8738e

Browse files
committed
Simplify?
1 parent 91083d7 commit da8738e

File tree

2 files changed

+8
-23
lines changed

2 files changed

+8
-23
lines changed

.github/workflows/on-tag.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -96,33 +96,21 @@ jobs:
9696
printf " GOARCH: %s\n" "${GOARCH}"
9797
printf " GOARM: %s\n" "${GOARM}"
9898
99-
# TODO: add labels, see: https://github.com/lncm/docker-lnd/blob/3a26bc667c441e94958b876170f87d538cb5a07a/.github/workflows/on-tag.yml#L102-L107
100-
- name: Build IPFS
101-
run: >
102-
docker build --no-cache .
103-
--build-arg "TEST_LEVEL=${TEST_LEVEL}"
104-
--build-arg "ARCH=${ARCH}"
105-
--build-arg "GOARCH=${GOARCH}"
106-
--build-arg "GOARM=${GOARM}"
107-
--target "final-${{matrix.flavor}}"
108-
--tag "${APP}:${FLAV_ARCH}"
109-
11099
- name: Register self-compiled qemu
111100
if: matrix.flavor == 'fuse' && matrix.arch != 'amd64'
112101
env:
113102
QEMU_VERSION: v4.2.0
114103
run: docker run --rm --privileged "meedamian/simple-qemu:${QEMU_VERSION}" -p yes
115104

116-
# For the `fuse` flavor trigger all `ONBUILD`s to make sure fuse is available
117-
- name: Expand fuse
118-
if: matrix.flavor == 'fuse'
105+
# TODO: add labels, see: https://github.com/lncm/docker-lnd/blob/3a26bc667c441e94958b876170f87d538cb5a07a/.github/workflows/on-tag.yml#L102-L107
106+
- name: Build IPFS
119107
run: >
120-
docker build .
108+
docker build --no-cache .
121109
--build-arg "TEST_LEVEL=${TEST_LEVEL}"
122110
--build-arg "ARCH=${ARCH}"
123111
--build-arg "GOARCH=${GOARCH}"
124112
--build-arg "GOARM=${GOARM}"
125-
--build-arg "FLAVOR=fuse"
113+
--build-arg "FLAVOR=${{matrix.flavor}}"
126114
--tag "${APP}:${FLAV_ARCH}"
127115
128116
- name: Show built image details

Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,11 @@ VOLUME /ipns/
207207
# Make data directory compatible with `nofuse` flavor
208208
ENV IPFS_PATH=/data/.ipfs/
209209

210-
# Prevent running of this image when `fuse` is not installed
211-
# TODO: replace URL
212-
ENTRYPOINT ["echo", "This build flavor has to be handled in a rather peculiar way. For details see: URL"]
210+
# For cross-compiled images this has to be run using `qemu`
211+
RUN apk add --no-cache fuse
213212

214-
# Install `fuse`, and set proper `ENTRYPOINT`, and `CMD`
215-
ONBUILD RUN apk add --no-cache fuse
216-
ONBUILD ENTRYPOINT ["ipfs"]
217-
ONBUILD CMD ["daemon", "--init", "--migrate", "--mount"]
213+
ENTRYPOINT ["ipfs"]
214+
CMD ["daemon", "--init", "--migrate", "--mount"]
218215

219216

220217

0 commit comments

Comments
 (0)