forked from owncloud/ocis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (33 loc) · 1.17 KB
/
Dockerfile
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
# Please use this Dockerfile only if
# you want to build an image from source without
# Yarn and Go installed on your dev machine.
# You can build oCIS using this Dockerfile
# by running following command:
# `docker build -t owncloud/ocis:custom .`
# In most other cases you might want to run the
# following command instead:
# `make -C ocis dev-docker`
# It will build a `owncloud/ocis:dev` image for you
# and use your local Yarn and Go caches and therefore
# is a lot faster than the below build steps.
FROM owncloudci/nodejs:14 as generate
COPY ./ /ocis/
WORKDIR /ocis/ocis
RUN make ci-node-generate
FROM owncloudci/golang:1.17 as build
COPY --from=generate /ocis /ocis
WORKDIR /ocis/ocis
RUN make ci-go-generate build
FROM alpine:3.13
RUN apk update && \
apk upgrade && \
apk add ca-certificates mailcap && \
rm -rf /var/cache/apk/* && \
echo 'hosts: files dns' >| /etc/nsswitch.conf
LABEL maintainer="ownCloud GmbH <[email protected]>" \
org.label-schema.name="ownCloud Infinite Scale" \
org.label-schema.vendor="ownCloud GmbH" \
org.label-schema.schema-version="1.0"
ENTRYPOINT ["/usr/bin/ocis"]
CMD ["server"]
COPY --from=build /ocis/ocis/bin/ocis /usr/bin/ocis