-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add policy to other_build in multibuild
Had to change docker context from a nested folder to the root of the repo.
- Loading branch information
1 parent
db5759b
commit bf67971
Showing
3 changed files
with
146 additions
and
114 deletions.
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Dockerfile.package | ||
# A dockerfile for packaging SSH No Ports releases using docker buildx | ||
|
||
FROM atsigncompany/buildimage:3.5.2_3.6.0-149.3.beta@sha256:df67b9e3271381fc0c5b20e7350cf4de8dad6ac62e075b49b1a866c49af47409 AS build | ||
# Using atsigncompany/buildimage until official dart image has RISC-V support | ||
WORKDIR /noports | ||
|
||
# install node for later (keep at the top file to increase cache hits) | ||
RUN apt-get update; \ | ||
apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2; | ||
|
||
COPY . . | ||
|
||
# Build packages/dart/sshnoports | ||
WORKDIR /noports/packages/dart/sshnoports | ||
RUN set -eux; \ | ||
mkdir -p /sshnp/debug; \ | ||
mkdir /tarball; \ | ||
dart pub get --enforce-lockfile; \ | ||
dart run build_runner build --delete-conflicting-outputs; \ | ||
dart compile exe bin/activate_cli.dart -v -o /sshnp/at_activate; \ | ||
dart compile exe bin/sshnp.dart -v -o /sshnp/sshnp; \ | ||
dart compile exe bin/npt.dart -v -o /sshnp/npt; \ | ||
dart compile exe bin/npa_file.dart -v -o /sshnp/npa_file; \ | ||
dart compile exe bin/sshnpd.dart -v -o /sshnp/sshnpd; \ | ||
dart compile exe bin/srv.dart -v -o /sshnp/srv; \ | ||
dart compile exe bin/npp.dart -v -o /sshnp/npp; \ | ||
dart compile exe bin/srvd.dart -v -o /sshnp/srvd; \ | ||
dart compile exe bin/srvd.dart -D ENABLE_SNOOP=true -v -o /sshnp/debug/srvd; \ | ||
cp -r bundles/core/* /sshnp/; \ | ||
cp -r bundles/shell/* /sshnp/; \ | ||
cp LICENSE /sshnp/; | ||
|
||
# Build apps/admin/admin_api | ||
WORKDIR /noports/apps/admin/admin_api | ||
RUN dart pub get --enforce-lockfile; \ | ||
dart compile exe bin/admin_api.dart -v -o /sshnp/admin_api | ||
|
||
# Build apps/admin/webapp | ||
WORKDIR /noports/apps/admin/webapp | ||
RUN npm install; \ | ||
npm run build; \ | ||
mkdir -p /sshnp/web/admin; \ | ||
cp -r ./dist /sshnp/web/admin | ||
|
||
RUN set -eux; \ | ||
case "$(dpkg --print-architecture)" in \ | ||
amd64) ARCH="x64";; \ | ||
armhf) ARCH="arm";; \ | ||
arm64) ARCH="arm64";; \ | ||
riscv64) ARCH="riscv64";; \ | ||
esac; \ | ||
tar -cvzf /tarball/sshnp-linux-"${ARCH}".tgz /sshnp | ||
|
||
FROM scratch | ||
COPY --from=build /tarball/* / |