File tree Expand file tree Collapse file tree 4 files changed +40
-3
lines changed Expand file tree Collapse file tree 4 files changed +40
-3
lines changed Original file line number Diff line number Diff line change 48
48
push : true
49
49
tags : ${{ steps.meta.outputs.tags }}
50
50
labels : ${{ steps.meta.outputs.labels }}
51
- cache-from : type=gha
51
+ cache-from : type=gha
52
+ build-args : |
53
+ ALPINE_VERSION=3.21.3
54
+ OPENSSL_VERSION=3.3.3-r0
55
+
Original file line number Diff line number Diff line change 1
- FROM alpine:3.21.3
1
+ ARG ALPINE_VERSION=3.21.3
2
+ FROM alpine:${ALPINE_VERSION}
2
3
3
4
# Install openssl and bash for better scripting
4
- RUN apk add --no-cache openssl bash
5
+ ARG OPENSSL_VERSION=3.3.3-r0
6
+ RUN apk add --no-cache openssl=${OPENSSL_VERSION} bash
5
7
6
8
# Set working directory
7
9
WORKDIR /app
Original file line number Diff line number Diff line change @@ -130,4 +130,32 @@ Should see tls.crt tls.key ca.crt in /certs
130
130
docker exec -it key2pfx-dev bash
131
131
132
132
cd /certs
133
+ ```
134
+
135
+ # Build with custom version
136
+
137
+ Docker compose
138
+
139
+ ``` yaml
140
+ key2pfx :
141
+ container_name : key2pfx-dev
142
+ # entrypoint: ["/bin/bash", "-c"]
143
+ # command: ["sleep infinity"]
144
+ image : key2pfx:latest
145
+ build :
146
+ context : ../
147
+ dockerfile : ./Dockerfile
148
+ args :
149
+ ALPINE_VERSION : 3.21.3
150
+ OPENSSL_VERSION : 3.3.3-r0
151
+ ` ` `
152
+
153
+ ` ` ` bash
154
+ docker compose -f docker-compose-dev.yaml build --no-cache
155
+ ```
156
+
157
+ Docker
158
+
159
+ ``` bash
160
+ docker build --build-arg ALPINE_VERSION=3.21.3 --build-arg OPENSSL_VERSION=3.3.3-r0 -t key2pfx:dev .
133
161
```
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ services:
7
7
build :
8
8
context : ../
9
9
dockerfile : ./Dockerfile
10
+ args :
11
+ ALPINE_VERSION : 3.21.3
12
+ OPENSSL_VERSION : 3.3.3-r0
10
13
environment :
11
14
- CRT=/certs/tls.crt
12
15
- KEY=/certs/tls.key
You can’t perform that action at this time.
0 commit comments