Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update base image #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
29 changes: 10 additions & 19 deletions base/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 && \
Expand All @@ -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 / && \
Expand All @@ -43,4 +33,5 @@ RUN godeb install ${GO_VERSION} && \

# Entrypoint
EXPOSE 6302

ENTRYPOINT ["gosu", "roshi:roshi", "roshi-server"]
3 changes: 2 additions & 1 deletion roshi-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion roshi-walker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down