File tree 2 files changed +15
-7
lines changed
2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change
1
+ FROM ubuntu:20.04 as builder
2
+
3
+ RUN apt-get update && apt-get install -y wget gcc
4
+
5
+ # Using these as links so that this Dockerfile is stand-alone
6
+ RUN wget https://raw.githubusercontent.com/deislabs/mystikos/main/samples/docker_aks/hello.c
7
+ RUN wget https://raw.githubusercontent.com/deislabs/mystikos/main/samples/docker_aks/config.json
8
+
9
+ RUN gcc -fPIC -o hello hello.c
10
+
1
11
FROM mystikos.azurecr.io/mystikos-focal:latest
2
12
3
- ADD appdir/bin /hello /appdir/bin/hello
4
- ADD config.json config.json
13
+ COPY --from=builder /hello /appdir/bin/hello
14
+ COPY --from=builder / config.json / config.json
5
15
6
16
RUN openssl genrsa -out private.pem -3 3072
7
17
RUN ./opt/mystikos/bin/myst package-sgx appdir private.pem config.json
Original file line number Diff line number Diff line change @@ -5,10 +5,8 @@ APPDIR := appdir
5
5
BUILD_DIR := $(CURDIR )
6
6
CFLAGS := -fPIC
7
7
DOCKER_IMG := mystikos-hello
8
- MYST_TARBALL := mystikos.tar.gz
9
- PSW_VERSION := 2.15.100
10
- MYST_RELEASE_VERSION := 0.5.0
11
- PACKAGE := myst/bin/hello
8
+ MYST_TARBALL := mystikos.tar.gz
9
+ PACKAGE := myst/bin/hello
12
10
13
11
.PHONY : $(APPDIR ) run clean
14
12
@@ -18,7 +16,7 @@ $(APPDIR): hello.c
18
16
@rm -rf $(APPDIR )
19
17
@mkdir -p $(APPDIR ) /bin
20
18
@gcc $(CFLAGS ) -o $(APPDIR ) /bin/hello hello.c
21
- @docker build --build-arg PSW_VERSION= $( PSW_VERSION ) --build-arg MYST_RELEASE_VERSION= $( MYST_RELEASE_VERSION ) - t $(DOCKER_IMG ) .
19
+ @docker build -t $(DOCKER_IMG ) .
22
20
23
21
# IMPORTANT:
24
22
# Before running this option, please set the RESOURCE_GROUP and CLUSTER_NAME options
You can’t perform that action at this time.
0 commit comments