-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
39 lines (28 loc) · 969 Bytes
/
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
# Build the matterwick
# Build image: golang:1.19.5
ARG DOCKER_BUILD_IMAGE=golang:1.22.8
# Base image: alpine 3.16.3
ARG DOCKER_BASE_IMAGE=alpine@sha256:3d426b0bfc361d6e8303f51459f17782b219dece42a1c7fe463b6014b189c86d
FROM ${DOCKER_BUILD_IMAGE} AS build
WORKDIR /matterwick/
COPY . /matterwick/
RUN make build
# Final Image
FROM ${DOCKER_BASE_IMAGE}
LABEL name="MatterWick" \
maintainer="[email protected]" \
distribution-scope="public" \
architecture="x86_64" \
url="https://mattermost.com"
ENV MATTERWICK=/matterwick/matterwick \
USER_UID=10001 \
USER_NAME=matterwick
WORKDIR /matterwick/
RUN apk update && apk add ca-certificates
COPY --from=build /matterwick/build/_output/bin/matterwick /matterwick/matterwick
COPY --from=build /matterwick/build/bin /usr/local/bin
COPY --from=build /matterwick/templates /matterwick/templates
RUN /usr/local/bin/user_setup
EXPOSE 8077
ENTRYPOINT ["/usr/local/bin/entrypoint"]
USER ${USER_UID}