Skip to content

Commit 4b5deb6

Browse files
Merge pull request #16 from codeformuenster/fix-dockerbuild
Smaller frontend dockerfile using static http server binary
2 parents 779202d + a021ec6 commit 4b5deb6

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
docker
3+
Dockerfile

Dockerfile

+9-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ RUN npm install
66
COPY . /usr/src/app
77
RUN npm run build
88

9-
FROM abiosoft/caddy:0.10.10
9+
FROM quay.io/geraldpape/as-builder:v1 as packer
1010

11-
COPY --from=build /usr/src/app/build /srv
11+
COPY --from=build /usr/src/app/build /assets
1212

13+
RUN as-builder -debug -src /assets -dest /assets-server -port 8080 -url /
14+
15+
FROM scratch
16+
17+
COPY --from=packer /assets-server /assets-server
18+
19+
CMD ["/assets-server"]

0 commit comments

Comments
 (0)