Browse Source

socat in alpine

Fabian Peter Hammerle 2 weeks ago
commit
3eaea48f1f
3 changed files with 31 additions and 0 deletions
  1. 9 0
      CHANGELOG.md
  2. 10 0
      Dockerfile
  3. 12 0
      docker-compose.yml

+ 9 - 0
CHANGELOG.md

@@ -0,0 +1,9 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## Unreleased
+### Added
+- socat in alpine

+ 10 - 0
Dockerfile

@@ -0,0 +1,10 @@
+FROM alpine:3.11
+
+ARG SOCAT_PACKAGE_VERSION=1.7.3.3-r1
+ARG TINI_PACKAGE_VERSION=0.18.0-r0
+RUN apk add --no-cache \
+        socat=$SOCAT_PACKAGE_VERSION \
+        tini=$TINI_PACKAGE_VERSION
+
+ENTRYPOINT ["/sbin/tini", "--", "socat"]
+CMD ["-h"]

+ 12 - 0
docker-compose.yml

@@ -0,0 +1,12 @@
+version: '2'
+
+services:
+  socat:
+    build: .
+    image: fphammerle/socat
+    security_opt: [no-new-privileges]
+    ports: ['1234:1234']
+    command: -d -d -v tcp4-listen:1234,fork 'exec:echo hello'
+    restart: unless-stopped
+
+# https://docs.docker.com/compose/compose-file/compose-file-v2/