-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfileLocal
More file actions
44 lines (31 loc) · 1007 Bytes
/
DockerfileLocal
File metadata and controls
44 lines (31 loc) · 1007 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
37
38
39
40
41
42
43
44
# For dev / testing - build using local code
# example build:
# docker build . -f DockerfileLocal -t certwarden-client:v0.1.0
# example local and export
# docker builder prune -a
# docker build . -f DockerfileLocal -t certwarden-client:v0.5.0-a3
# docker save -o ./out/cwc0.5.0-a3.tar certwarden-client:v0.5.0-a3
# import into docker
# docker load -i ./out/cwc0.5.0-a3.tar
# Versions - keep in sync with build_releases.yml
ARG ALPINE_VERSION=3.21
ARG GO_VERSION=1.24.2
# https://hub.docker.com/_/alpine
# https://hub.docker.com/_/golang
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS build
WORKDIR /
COPY ./ ./src
RUN cd /src && \
go build -o ./certwarden-client-linux-amd64 ./pkg/main
FROM alpine:${ALPINE_VERSION}
WORKDIR /app
# timezone support
RUN apk add --no-cache tzdata
# copy app
COPY --from=build /src/certwarden-client-linux-amd64 .
COPY ./README.md .
COPY ./CHANGELOG.md .
COPY ./LICENSE.md .
# https server
EXPOSE 5055/tcp
CMD /app/certwarden-client-linux-amd64