-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
51 lines (37 loc) · 1.33 KB
/
Containerfile
File metadata and controls
51 lines (37 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
from docker.io/library/golang:alpine as generate-openapi-spec
workdir /build
copy Makefile .swaggo go.* .
copy internal/web ./internal/web
run apk --no-cache add make gcc musl-dev
run make target/swagger.json
from docker.io/library/node:lts-alpine as build-frontend
workdir /build
copy Makefile .
copy frontend ./frontend
copy --from=generate-openapi-spec /build/target ./target
run apk --no-cache add make
run make \
--assume-old target/swagger.json \
frontend/build
from docker.io/library/golang:alpine as build-backend
workdir /build
copy Makefile *.yaml go.* .
copy internal ./internal
copy cmd ./cmd
copy --from=generate-openapi-spec /build/target ./target
copy --from=build-frontend /build/frontend/build ./frontend/build
copy --from=build-frontend /build/frontend/*.go ./frontend/
run apk --no-cache add make gcc musl-dev
run make \
--assume-old frontend/build \
build
from docker.io/library/alpine
workdir /app
copy --from=build-backend /build/target/plaincooking .
label org.opencontainers.image.authors="Lukas Dietrich <lukas@lukasdietrich.com>"
label org.opencontainers.image.source="https://github.com/lukasdietrich/plaincooking"
volume /data
expose 8080/tcp
env PLAINCOOKING_DATABASE_FILENAME "/data/plaincooking.sqlite"
env PLAINCOOKING_DATABASE_JOURNALMODE "wal"
cmd [ "/app/plaincooking" ]