Skip to content

Commit 92a8d63

Browse files
committed
[feature] add socket-proxy
1 parent 71a8a50 commit 92a8d63

File tree

3 files changed

+61
-4
lines changed

3 files changed

+61
-4
lines changed

.github/workflows/socket-proxy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: tags
2+
on:
3+
push:
4+
tags:
5+
- 'socket-proxy'
6+
jobs:
7+
socket-proxy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: init / base64 nested json
11+
uses: actions/github-script@62c3794a3eb6788d9a2a72b219504732c0c9a298
12+
with:
13+
script: |
14+
const { Buffer } = require('node:buffer');
15+
(async()=>{
16+
try{
17+
const master = await fetch('https://raw.githubusercontent.com/11notes/docker-socket-proxy/refs/heads/master/.json');
18+
const dot = await master.json();
19+
const etc = {
20+
dockerfile:"socket-proxy.dockerfile",
21+
tag:"socket-proxy",
22+
version:dot.semver.version,
23+
uid:0,
24+
gid:0,
25+
};
26+
core.exportVariable('WORKFLOW_BASE64JSON', Buffer.from(JSON.stringify(etc)).toString('base64'));
27+
}catch(e){
28+
core.setFailed(`workflow failed: ${e}`);
29+
}
30+
})();
31+
32+
- name: build docker image
33+
uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7
34+
with:
35+
workflow: docker.yml
36+
token: "${{ secrets.REPOSITORY_TOKEN }}"
37+
inputs: '{ "release":"false", "readme":"false", "run-name":"socket-proxy", "etc":"${{ env.WORKFLOW_BASE64JSON }}" }'

project.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
${{ content_synopsis }} This image and its different layers can be used to build a distroless boiler plate for your application. Simply add the base layer and any additional layers (tags) with the stuff you need to run your application. All binaries are statically compiled and do not depend on any OS libraries or clib. The base layer contains Root CA certificates as well as time zone data and the user configuration for root and docker. Additional layers (tags) with statically compiled binaries are:
22

3-
* [11notes/distroless:curl](https://github.com/11notes/docker-distroless/blob/master/curl.dockerfile) - curl (for healthchecks)
4-
* [11notes/distroless:dnslookup](https://github.com/11notes/docker-distroless/blob/master/dnslookup.dockerfile) - dnslookup (for healthchecks)
5-
* [11notes/distroless:lego](https://github.com/11notes/docker-distroless/blob/master/lego.dockerfile) - lego (ACME client)
3+
* [11notes/distroless:curl](https://github.com/11notes/docker-distroless/blob/master/curl.dockerfile) - curl
4+
* [11notes/distroless:dnslookup](https://github.com/11notes/docker-distroless/blob/master/dnslookup.dockerfile) - dnslookup
5+
* [11notes/distroless:lego](https://github.com/11notes/docker-distroless/blob/master/lego.dockerfile) - lego
66
* [11notes/distroless:node](https://github.com/11notes/docker-node) - node
77
* [11notes/distroless:adguard](https://github.com/11notes/docker-adguard) - adguard
8+
* [11notes/distroless:adguard-sync](https://github.com/11notes/docker-adguard-sync) - adguard-sync
89
* [11notes/distroless:nginx](https://github.com/11notes/docker-nginx) - nginx
910
* [11notes/distroless:traefik](https://github.com/11notes/docker-traefik) - traefik
1011
* [11notes/distroless:tini-pm](https://github.com/11notes/go-tini-pm) - tini-pm
1112
* [11notes/distroless:cmd-socket](https://github.com/11notes/go-cmd-socket) - cmd-socket
13+
* [11notes/distroless:socket-proxy](https://github.com/11notes/docker-socket-proxy) - socket-proxy
1214

13-
Each tag has sub tags like latest, stable or semver, check the tags available for each binary. If you need more binaries, open a PR or feature request.
15+
Each tag has sub tags like latest, stable or semver, check the tags available for each binary. If you need more binaries, open a PR or feature request. Some of the images have their own dedicated container images to run the applications within, simply check the link for the source and explanation on how to use them.
16+
17+
These images are meant as direct competition to very popular images which come with almost no security in mind!
1418

1519
${{ content_build }}
1620

socket-proxy.dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ARG APP_VERSION=stable
2+
ARG APP_UID=0
3+
ARG APP_GID=0
4+
5+
# :: Distroless
6+
FROM 11notes/distroless AS distroless
7+
FROM 11notes/socket-proxy:${APP_VERSION} AS socket-proxy
8+
FROM scratch
9+
ARG APP_UID
10+
ARG APP_GID
11+
COPY --from=distroless --chown=${APP_UID}:${APP_GID} / /
12+
COPY --from=socket-proxy --chown=${APP_UID}:${APP_GID} /usr/local/bin/socket-proxy /usr/local/bin/socket-proxy
13+
14+
# :: Start
15+
USER ${APP_UID}:${APP_GID}
16+
ENTRYPOINT ["/usr/local/bin/socket-proxy"]

0 commit comments

Comments
 (0)