github.com/metacurrency/holochain@v0.1.0-alpha-26.0.20200915073418-5c83169c9b5b/docker/core.docker/Dockerfile.core.entrypointForLocalUID (about) 1 FROM golang:1.8-alpine 2 MAINTAINER Gerry Gleason && Christopher Reay 3 4 RUN apk add --update \ 5 ca-certificates \ 6 curl wget \ 7 curl-dev \ 8 procps \ 9 openrc \ 10 git \ 11 make \ 12 sudo \ 13 su-exec \ 14 && rm -rf /var/cache/apk/* \ 15 \ 16 && chmod +s /usr/bin/passwd 17 RUN addgroup holochain -g 868 \ 18 && adduser -G holochain -u 868 -D holochain \ 19 && sed -i~orig -e'/wheel/s/$/,holochain/' /etc/group \ 20 && passwd -u holochain \ 21 && sed -i~orig -e'/ALL) ALL/s/# %wheel/%wheel/' /etc/sudoers \ 22 && mv /etc/profile.d/color_prompt /etc/profile.d/color_prompt.sh 23 24 # Install gx and holochain and all their dependencies and hold them in a docker image 25 ## Using Docker env tools, because we are installing everything as root 26 ENV GOPATH=/work/golang \ 27 GOBIN=/home/holochain/bin 28 ENV PATH=$GOPATH/bin:/usr/local/go/bin:$GOBIN:$PATH 29 30 RUN go get -v -u github.com/whyrusleeping/gx 31 RUN go get -v -d github.com/holochain/holochain-proto 32 33 WORKDIR /work/golang/src/github.com/holochain/holochain-proto 34 RUN make deps 35 36 WORKDIR /work/golang/src/github.com/holochain/holochain-proto 37 38 # make our development files available to hc, on top of the cached image "so far" from above 39 ADD . /work/holochain 40 41 # this rm line works well because it stops weird artifacts coming over from github.com/holochain/holochain-proto::master 42 RUN rm -rf /work/golang/src/github.com/holochain/holochain-proto/* \ 43 && cp -pr /work/holochain/* /work/golang/src/github.com/holochain/holochain-proto/ \ 44 && chown -R root:holochain /work \ 45 && chmod 775 -R /work 46 47 # compile and test our development files 48 RUN make; make bs 49 RUN make test 50 51 EXPOSE 3141 52 53 # sort out dynamic user login 54 COPY scriptsAccessibleByDockerfiles/entrypoint.sh.addHostUserToContainer /usr/local/bin/entrypoint.sh.addHostUserToContainer 55 RUN chmod +x /usr/local/bin/entrypoint.sh.addHostUserToContainer 56 ENTRYPOINT ["/usr/local/bin/entrypoint.sh.addHostUserToContainer"] 57 58 59 #CMD ["su", "holochain", "-c", "source /etc/holochain.env_vars; make test" ]