Closed tuxpeople closed 1 year ago
I would also appriciate to see this, as currently i am stuck with the arm64 rpm (#648) and tried to get it working on Docker by building the container myself. However i wasn't succesfull and gave up. I may try it again to work around #648.
This would be super easy todo if semaphore were using Github Workflows instead of Circle CI 😁
Honestly, I was a little surprised that the Docker image wasn't already multi arch since the project is already building the code for multiple architectures. Any chance of this happening @fiftin ?
I'd like to see this happen also. Too much of a pain to build arm64 docker image from scratch.
For people just wanting to use semaphore in docker, without waiting for an offical/supported image, i created a Dockerfile (for now the download itself needs to be modified to work on other archs than arm64) which up to now works:
FROM ubuntu:latest as runner
LABEL maintainer="Tom Whiston <tom.whiston@gmail.com>"
ARG SEMAPHORE_VERSION=2.8.68
ENV DEBIAN_FRONTEND=noninteractive
RUN echo 'tzdata tzdata/Areas select Europe' | debconf-set-selections && \
echo 'tzdata tzdata/Zones/Europe select Berlin' | debconf-set-selections
RUN apt-get update && apt-get install -y sshpass git curl ansible mysql-client openssh-client python3-aiohttp tini
RUN curl -O -L https://github.com/ansible-semaphore/semaphore/releases/download/v${SEMAPHORE_VERSION}/semaphore_${SEMAPHORE_VERSION}_linux_arm64.deb && \
apt-get install -y ./semaphore_${SEMAPHORE_VERSION}_linux_arm64.deb && \
rm ./semaphore_${SEMAPHORE_VERSION}_linux_arm64.deb
RUN adduser --disabled-password --uid 1001 --ingroup root --gecos GECOS semaphore && \
mkdir -p /tmp/semaphore && \
mkdir -p /etc/semaphore && \
mkdir -p /var/lib/semaphore && \
chown -R semaphore:0 /tmp/semaphore && \
chown -R semaphore:0 /etc/semaphore && \
chown -R semaphore:0 /var/lib/semaphore
COPY ./deployment/docker/common/semaphore-wrapper /usr/local/bin
RUN chown -R semaphore:0 /usr/local/bin/semaphore-wrapper && \
chown -R semaphore:0 /usr/bin/semaphore
WORKDIR /home/semaphore
USER 1001
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/usr/local/bin/semaphore-wrapper", "/usr/bin/semaphore", "server", "--config", "/etc/semaphore/config.json"]
It is quite ugly, and the image takes ~700 mb (currently without any optimizations, if at all possible), but for now i do not care.
I tried to build the image via git clone https://github.com/ansible-semaphore/semaphore.git && git checkout v2.8.68
and docker build -f deployment/docker/prod/Dockerfile --tag semaphoreui/semaphore:v2.8.68 .
, but even after modifying the ./Taskfile.yml
for downloading the goreleaser package for arm64 on an linux/aarch64 platform, i got stuck with the glibc thingy.
I did not find any way to get glibc installed for arm64 on the alpine image.
Current personal modification of aarch64:
diff --git a/Taskfile.yml b/Taskfile.yml
index 61cbff5..2d01bc8 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -56,7 +56,8 @@ tasks:
- go install github.com/gobuffalo/packr/...@v1.10.4
- go install github.com/snikch/goodman/cmd/goodman@latest
- go install github.com/go-swagger/go-swagger/cmd/swagger@v0.29.0
- - '{{ if ne OS "windows" }} sh -c "curl -L https://github.com/goreleaser/goreleaser/releases/download/v{{ .GORELEASER_VERSION }}/goreleaser_$(uname -s)_$(uname -m).tar.gz | tar -xz -C $(go env GOPATH)/bin goreleaser"{{ else }} {{ end }}'
+ - '{{ if ne OS "windows" }} sh -c "curl -L https://github.com/goreleaser/goreleaser/releases/download/v{{ .GORELEASER_VERSION }}/goreleaser_$(uname -s)_$(if [ "aarch64" == $(uname -m) ]; then
+echo "arm64"; else $(uname -m); fi).tar.gz | tar -xz -C $(go env GOPATH)/bin goreleaser"{{ else }} {{ end }}'
- '{{ if ne OS "windows" }} chmod +x $(go env GOPATH)/bin/goreleaser{{ else }} {{ end }}'
- '{{ if eq OS "windows" }} echo "NOTICE: You must download goreleaser manually to build this application https://github.com/goreleaser/goreleaser/releases "{{ else }}:{{ end }}'
- '{{ if ne OS "windows" }} sh -c "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v{{ .GOLINTER_VERSION }}"{{ else }}{{ end }}'
Hope this does not count as spam and may be of help in any way.
Hi @gaby Currently Semaphore uses GitHub actions, but I don't know how to build multiarch image. Can you help please? :)
@fiftin and @tuxpeople can you please close this issue as looks like it is resolved.
Thank you, Radu
Hi,
For us running containers not on amd64 it would be great to have multi arch images. Any chance this is getting on your roadmap? armv7 and arm64 would be awesome!
kind regards Thomas