Skip to content

Commit e6c4bc3

Browse files
committedAug 29, 2022
more updates
1 parent 488d7fb commit e6c4bc3

15 files changed

+40
-691
lines changed
 

‎Dockerfile

+2-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
1-
FROM arm64v8/alpine:latest
1+
FROM start9/hello-world
22

3-
RUN apk update
4-
RUN apk add tini curl
3+
RUN apk add curl
54

6-
ADD ./hello-world/target/aarch64-unknown-linux-musl/release/hello-world /usr/local/bin/hello-world
75
ADD ./docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh
86
RUN chmod a+x /usr/local/bin/docker_entrypoint.sh
9-
ADD ./scripts/check-web.sh /usr/local/bin/check-web.sh
10-
RUN chmod +x /usr/local/bin/check-web.sh
11-
12-
WORKDIR /root
13-
14-
EXPOSE 80
15-
16-
ENTRYPOINT ["/usr/local/bin/docker_entrypoint.sh"]

‎Makefile

+13-17
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
1-
ID_NAME := $(shell yq e ".id" manifest.yaml)
2-
VERSION := $(shell yq e ".version" manifest.yaml)
1+
PKG_ID := $(shell yq e ".id" manifest.yaml)
2+
PKG_VERSION := $(shell yq e ".version" manifest.yaml)
33
TS_FILES := $(shell find ./ -name \*.ts)
4-
HELLO_WORLD_SRC := $(shell find ./hello-world/src) hello-world/Cargo.toml hello-world/Cargo.lock
54

65
# delete the target of a rule if it has changed and its recipe exits with a nonzero exit status
76
.DELETE_ON_ERROR:
87

98
all: verify
109

11-
install:
12-
embassy-cli package install $(ID_NAME).s9pk
10+
verify: $(PKG_ID).s9pk
11+
embassy-sdk verify s9pk $(PKG_ID).s9pk
1312

14-
verify: $(ID_NAME).s9pk
15-
embassy-sdk verify s9pk $(ID_NAME).s9pk
13+
install:
14+
embassy-cli package install $(PKG_ID).s9pk
1615

1716
clean:
1817
rm -f image.tar
19-
rm -f $(ID_NAME).s9pk
18+
rm -f $(PKG_ID).s9pk
2019
rm -f scripts/*.js
2120

22-
$(ID_NAME).s9pk: manifest.yaml instructions.md icon.png LICENSE scripts/embassy.js image.tar
23-
embassy-sdk pack
24-
25-
image.tar: Dockerfile docker_entrypoint.sh scripts/check-web.sh hello-world/target/aarch64-unknown-linux-musl/release/hello-world
26-
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --tag start9/$(ID_NAME)/main:$(VERSION) --platform=linux/arm64 -o type=docker,dest=image.tar .
27-
28-
hello-world/target/aarch64-unknown-linux-musl/release/hello-world: $(HELLO_WORLD_SRC)
29-
docker run --rm -it -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/hello-world:/home/rust/src messense/rust-musl-cross:aarch64-musl cargo build --release
30-
3121
scripts/embassy.js: $(TS_FILES)
3222
deno bundle scripts/embassy.ts scripts/embassy.js
23+
24+
image.tar: Dockerfile docker_entrypoint.sh
25+
docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/arm64 -o type=docker,dest=image.tar .
26+
27+
$(PKG_ID).s9pk: manifest.yaml instructions.md icon.png LICENSE scripts/embassy.js image.tar
28+
embassy-sdk pack

‎hello-world/.gitignore

-1
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.