-
Notifications
You must be signed in to change notification settings - Fork 331
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
Changes to support arm64 (and Apple M1) #185
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM debian:bullseye as compile-lkd | ||
FROM golang:bullseye as compile-lkd | ||
MAINTAINER Marios Andreopoulos <[email protected]> | ||
|
||
RUN apt-get update \ | ||
|
@@ -9,8 +9,10 @@ RUN apt-get update \ | |
&& rm -rf /var/lib/apt/lists/* \ | ||
&& echo "progress = dot:giga" | tee /etc/wgetrc \ | ||
&& mkdir -p /mnt /opt /data \ | ||
&& wget https://github.com/andmarios/duphard/releases/download/v1.0/duphard -O /bin/duphard \ | ||
&& chmod +x /bin/duphard | ||
&& go install github.com/andmarios/duphard@latest \ | ||
&& go install gitlab.com/andmarios/checkport@latest \ | ||
&& go install github.com/andmarios/quickcert@latest \ | ||
&& ln -s /go/bin/duphard /bin/duphard | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
WORKDIR / | ||
|
@@ -324,6 +326,9 @@ CMD ["bash", "-c", "tar -czf /mnt/LKD-${LKD_VERSION}.tar.gz -C /opt landoop; cho | |
FROM debian:bullseye-slim | ||
MAINTAINER Marios Andreopoulos <[email protected]> | ||
COPY --from=compile-lkd /opt /opt | ||
COPY --from=compile-lkd /go/bin/checkport /usr/local/bin/checkport | ||
COPY --from=compile-lkd /go/bin/quickcert /usr/local/bin/quickcert | ||
|
||
|
||
# Update, install tooling and some basic setup | ||
RUN apt-get update \ | ||
|
@@ -365,15 +370,28 @@ WORKDIR / | |
# caddy : an excellent web server we use to serve fast-data-dev UI, proxy various REST | ||
# endpoints, etc | ||
# https://github.com/mholt/caddy | ||
ARG CHECKPORT_URL="https://gitlab.com/andmarios/checkport/uploads/3903dcaeae16cd2d6156213d22f23509/checkport" | ||
ARG QUICKCERT_URL="https://github.com/andmarios/quickcert/releases/download/1.0/quickcert-1.0-linux-amd64-alpine" | ||
ARG GLIBC_INST_VERSION="2.32-r0" | ||
ARG CADDY_URL=https://github.com/caddyserver/caddy/releases/download/v0.11.5/caddy_v0.11.5_linux_amd64.tar.gz | ||
ARG GOTTY_URL=https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz | ||
RUN wget "$CHECKPORT_URL" -O /usr/local/bin/checkport \ | ||
&& wget "$QUICKCERT_URL" -O /usr/local/bin/quickcert \ | ||
&& chmod 0755 /usr/local/bin/quickcert /usr/local/bin/checkport \ | ||
&& wget "$CADDY_URL" -O /caddy.tgz \ | ||
ARG CADDY_URL_AMD64=https://github.com/caddyserver/caddy/releases/download/v0.11.5/caddy_v0.11.5_linux_amd64.tar.gz | ||
ARG GOTTY_URL_AMD64=https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz | ||
ARG CADDY_URL_ARM64=https://github.com/caddyserver/caddy/releases/download/v0.11.5/caddy_v0.11.5_linux_arm64.tar.gz | ||
ARG GOTTY_URL_ARM64=https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_arm.tar.gz | ||
RUN set -eux; \ | ||
dpkgArch="$(dpkg --print-architecture)"; \ | ||
dir=/usr/local/src; \ | ||
CADDY_URL=; \ | ||
GOTTY_URL=; \ | ||
case "${dpkgArch##*-}" in \ | ||
'amd64') \ | ||
CADDY_URL="$CADDY_URL_AMD64"; \ | ||
GOTTY_URL="$GOTTY_URL_AMD64"; \ | ||
;; \ | ||
'arm64') \ | ||
CADDY_URL="$CADDY_URL_ARM64"; \ | ||
GOTTY_URL="$GOTTY_URL_ARM64"; \ | ||
;; \ | ||
*) echo >&2 "error: unsupported architecture '$dpkgArch' (likely packaging update needed)"; exit 1 ;; \ | ||
esac; \ | ||
wget "$CADDY_URL" -O /caddy.tgz \ | ||
&& mkdir -p /opt/caddy \ | ||
&& tar xzf /caddy.tgz -C /opt/caddy \ | ||
&& rm -f /caddy.tgz \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for approving the PR. There is the outstanding question of where these notes should go. If down here in the
README.md
is fine, then I should remove these lines.There is also the question of whether the maintainers of this repo will run the
buildx
command and publish a new image? I'm not sure what the release process is here. Thanks!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dougdonohoe I would definitely recommend using something like GitHub Actions to perform the building and publishing of the multi-platform container. Please see the example here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no rights for on this repository, so am unable to add new Github Actions. I can't actually merge this PR.