Skip to content

Commit a67b8d9

Browse files
committed
1 parent 4f5a4d8 commit a67b8d9

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

docker/Dockerfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

docker/Dockerfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# __
2+
# .-----.-----.______.-----.----.-----.--.--.--.--.______.----.---.-.----| |--.-----.
3+
# | _ | _ |______| _ | _| _ |_ _| | |______| __| _ | __| | -__|
4+
# |___ |_____| | __|__| |_____|__.__|___ | |____|___._|____|__|__|_____|
5+
# |_____| |__| |_____|
6+
#
7+
# Copyright (c) 2023 Fabio Cicerchia. https://fabiocicerchia.it. MIT License
8+
# Repo: https://github.com/fabiocicerchia/go-proxy-cache
9+
10+
FROM golang:1.20.1-alpine3.17 AS builder
11+
12+
ARG BUILD_CMD=build
13+
14+
WORKDIR /go/src/github.com/fabiocicerchia/go-proxy-cache
15+
16+
ENV CGO_CFLAGS -march=native -O3
17+
18+
RUN apk update \
19+
&& apk add --no-cache \
20+
gcc \
21+
libc-dev \
22+
make
23+
24+
COPY . ./
25+
26+
RUN make $BUILD_CMD
27+
28+
FROM alpine:3.23.2
29+
30+
WORKDIR /app
31+
32+
COPY --from=builder /go/src/github.com/fabiocicerchia/go-proxy-cache/go-proxy-cache /usr/local/bin/
33+
COPY --from=builder /go/src/github.com/fabiocicerchia/go-proxy-cache/config.yml.dist /app/config.yml
34+
35+
RUN apk upgrade
36+
37+
RUN go-proxy-cache --version \
38+
&& go-proxy-cache --test
39+
40+
CMD ["go-proxy-cache"]

0 commit comments

Comments
 (0)