File tree Expand file tree Collapse file tree 1 file changed +25
-7
lines changed Expand file tree Collapse file tree 1 file changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -546,13 +546,31 @@ export class AtomicServer {
546
546
throw new Error ( `Unknown platform for target: ${ target } ` ) ;
547
547
}
548
548
549
- return dag
550
- . container ( { platform } )
551
- . from ( "alpine:latest" )
552
- . withFile ( "/usr/local/bin/atomic-server" , binary )
553
- . withExec ( [ "chmod" , "+x" , "/usr/local/bin/atomic-server" ] )
554
- . withEntrypoint ( [ "/usr/local/bin/atomic-server" ] )
555
- . withDefaultArgs ( [ ] ) ;
549
+ const innerImage = "alpine:latest" ;
550
+
551
+ // https://github.com/dagger/dagger/issues/9998
552
+ const dir = dag . directory ( ) . withNewFile (
553
+ "Dockerfile" ,
554
+ `FROM ${ innerImage }
555
+
556
+ VOLUME /atomic-storage
557
+ ` ,
558
+ ) ;
559
+
560
+ return (
561
+ dag
562
+ . container ( { platform } )
563
+ . build ( dir )
564
+ // .from(innerImage)
565
+ . withFile ( "/usr/local/bin/atomic-server" , binary )
566
+ . withExec ( [ "chmod" , "+x" , "/usr/local/bin/atomic-server" ] )
567
+ . withEntrypoint ( [ "/usr/local/bin/atomic-server" ] )
568
+ . withEnvVariable ( "ATOMIC_DATA_DIR" , "/atomic-storage/data" )
569
+ . withEnvVariable ( "ATOMIC_CONFIG_DIR" , "/atomic-storage/config" )
570
+ . withEnvVariable ( "ATOMIC_PORT" , "80" )
571
+ . withExposedPort ( 80 )
572
+ . withDefaultArgs ( [ ] )
573
+ ) ;
556
574
}
557
575
558
576
@func ( )
You can’t perform that action at this time.
0 commit comments