diff --git a/README.md b/README.md index fcc5465..9eaf593 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,14 @@ curl "$(boot2docker ip):6060/metrics" The server image includes `EXPOSE 6302` (the default Roshi port), so container linking will work. +# Building a new image +in each folder run +``` +docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ello/roshi-base:latest . +docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ello/roshi-server:latest . +docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ello/roshi-walker:latest . +``` + # Roshi License View the [Roshi license information](https://github.com/soundcloud/roshi/blob/master/LICENSE.md). diff --git a/base/Dockerfile b/base/Dockerfile index fc86d67..1de5663 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -1,4 +1,5 @@ -FROM ubuntu-debootstrap:latest +# with later golang versions roshi fails to build ( 1.15.15-buster, 1.16.15-bullseye ) +FROM golang:1.14.15-buster # Add roshi user and group RUN groupadd --system roshi && \ @@ -9,31 +10,20 @@ RUN apt-get update && \ apt-get install -y curl git make && \ rm -rf /var/lib/apt/lists/* -# Install gosu -# https://github.com/tianon/gosu -RUN gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 -RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-$(dpkg --print-architecture)" && \ - curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-$(dpkg --print-architecture).asc" && \ - gpg --verify /usr/local/bin/gosu.asc && \ - rm /usr/local/bin/gosu.asc && \ - chmod +x /usr/local/bin/gosu - -# Install Godeb -# https://github.com/niemeyer/godeb -RUN curl -Ss -o /tmp/godeb-amd64.tar.gz https://godeb.s3.amazonaws.com/godeb-amd64.tar.gz && \ - tar -xvzf /tmp/godeb-amd64.tar.gz -C /usr/local/bin && \ - rm /tmp/godeb-amd64.tar.gz +RUN set -eux; \ + apt-get update; \ + apt-get install -y gosu ; \ +# verify that the binary works + gosu nobody true # Envs ENV ROSHI_COMMIT="4c3eb77eadb3a500ca14ac0578bd45bf5e640ddc" -ENV GO_VERSION="1.4.2" # Install Go, build roshi-server and roshi-walker, then delete Go -RUN godeb install ${GO_VERSION} && \ - export GOPATH=/go && export PATH=$PATH:${GOPATH}/bins && \ - mkdir -p ${GOPATH}/src/github.com/soundcloud && \ +RUN mkdir -p ${GOPATH}/src/github.com/soundcloud && \ git clone https://github.com/soundcloud/roshi.git ${GOPATH}/src/github.com/soundcloud/roshi && \ cd ${GOPATH}/src/github.com/soundcloud/roshi && git checkout ${ROSHI_COMMIT} && \ + # go mod init && go mod tidy && \ cd roshi-server && make && mv roshi-server /usr/local/bin && \ cd ../roshi-walker && make && mv roshi-walker /usr/local/bin && \ cd / && \ @@ -43,4 +33,5 @@ RUN godeb install ${GO_VERSION} && \ # Entrypoint EXPOSE 6302 + ENTRYPOINT ["gosu", "roshi:roshi", "roshi-server"] diff --git a/roshi-server/Dockerfile b/roshi-server/Dockerfile index 897e89c..a707313 100644 --- a/roshi-server/Dockerfile +++ b/roshi-server/Dockerfile @@ -1,4 +1,5 @@ -FROM ello/roshi-base:latest +#FROM ello/roshi-base:latest +FROM jovoto/roshi-base-1.14.15-buster # Entrypoint EXPOSE 6302 diff --git a/roshi-walker/Dockerfile b/roshi-walker/Dockerfile index 6a57b5c..0e5381a 100644 --- a/roshi-walker/Dockerfile +++ b/roshi-walker/Dockerfile @@ -1,4 +1,5 @@ -FROM ello/roshi-base:latest +#FROM ello/roshi-base:latest +FROM jovoto/roshi-base-1.14.15-buster # Entrypoint EXPOSE 6060