-
Notifications
You must be signed in to change notification settings - Fork 32
/
Dockerfile
41 lines (29 loc) · 1.26 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND noninteractive
ARG USER_UID
ARG KUBO_VER
RUN apt-get update -q && apt-get install -y git curl gnupg jq build-essential gawk zip tzdata && \
ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
dpkg-reconfigure --frontend noninteractive tzdata
RUN curl -sS --retry 5 \
"https://dist.ipfs.tech/kubo/${KUBO_VER}/kubo_${KUBO_VER}_linux-amd64.tar.gz" -o /tmp/kubo.tar.gz && \
tar vzx -f /tmp/kubo.tar.gz -C /usr/local/bin/ kubo/ipfs --strip-components=1
RUN adduser --shell /bin/bash --home /asdf --disabled-password --gecos asdf asdf --uid $USER_UID
ENV PATH="${PATH}:/asdf/.asdf/shims:/asdf/.asdf/bin"
USER asdf
WORKDIR /asdf
RUN git clone --depth 1 https://github.com/asdf-vm/asdf.git $HOME/.asdf && \
echo '. $HOME/.asdf/asdf.sh' >> $HOME/.bashrc && \
echo '. $HOME/.asdf/asdf.sh' >> $HOME/.profile
RUN asdf plugin-add golang
RUN asdf plugin-add nodejs
ADD .tool-versions .
RUN asdf install
ENV IPFS_PATH=/asdf/.ipfs
RUN mkdir -p ${IPFS_PATH} && echo "/ip4/127.0.0.1/tcp/5001" > ${IPFS_PATH}/api
RUN go install github.com/guseggert/glibc-check/cmd/glibc-check@v0.0.0-20211130152056-cb76aed949fd && asdf reshim
ARG CACHEBUST=undefined
USER root
RUN apt-get update && apt-get -y upgrade
USER asdf
WORKDIR /build