-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (27 loc) · 1013 Bytes
/
Dockerfile
File metadata and controls
36 lines (27 loc) · 1013 Bytes
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
## build drawref binary
FROM docker.io/golang:1.23-alpine AS build-env
RUN apk upgrade -U --force-refresh --no-cache && apk add --no-cache --purge --clean-protected -l -u make git
# copy drawref source
WORKDIR /go/src/github.com/drawref/drawref-backend
COPY . .
# compile
RUN make install
## build drawref container
FROM docker.io/alpine:3.19
# metadata
LABEL maintainer="Daniel Oaks <daniel@danieloaks.net>" \
description="Drawref is a webapp that holds and presents images for drawing reference"
# standard port listened on
EXPOSE 8465/tcp
# drawref itself
COPY --from=build-env /go/bin/drawref-backend \
/go/src/github.com/drawref/drawref-backend/distrib/docker/run.sh \
/drawref-bin/
COPY --from=build-env /go/src/github.com/drawref/drawref-backend/migrations \
/drawref-bin/migrations
# launch
ENTRYPOINT ["/drawref-bin/run.sh"]
# # uncomment to debug
# RUN apk add --no-cache bash
# RUN apk add --no-cache vim
# CMD /bin/bash