This is a Docker container for MicroSocks, a multithreaded, small, efficient SOCKS5 server.
MicroSocks by rofl0r. Binaries built from the latest sources, container based on Alpine.
NOTE: The Docker command provided in this quick start is given as an example and parameters should be adjusted to your need.
Launch the microsocks docker container with the following command:
docker run -d \
--name=microsocks \
-p 1080:1080 \
shawly/microsocks
docker run [-d] \
--name=microsocks \
[-e <VARIABLE_NAME>=<VALUE>]... \
[-p <HOST_PORT>:<CONTAINER_PORT>]... \
shawly/microsocks
Parameter | Description |
---|---|
-d | Run the container in background. If not set, the container runs in foreground. |
-e | Pass an environment variable to the container. See the Environment Variables section for more details. |
-p | Set a network port mapping (exposes an internal container port to the host). See the Ports section for more details. |
To customize some properties of the container, the following environment
variables can be passed via the -e
parameter (one for each variable). Value
of this parameter has the format <VARIABLE_NAME>=<VALUE>
.
Variable | Description | Default |
---|---|---|
TZ |
[TimeZone] of the container. Timezone can also be set by mapping /etc/localtime between the host and the container. |
Etc/UTC |
Here is the list of ports used by the container. They can be mapped to the host
via the -p
parameter (one per port mapping). Each mapping is defined in the
following format: <HOST_PORT>:<CONTAINER_PORT>
. The port number inside the
container cannot be changed, but you are free to use any port on the host side.
Port | Mapping to host | Description |
---|---|---|
1080 | Mandatory | Port used for microsocks. |
As seen, environment variables, volume mappings and port mappings are specified while creating the container.
The following steps describe the method used to add, remove or update parameter(s) of an existing container. The generic idea is to destroy and re-create the container:
- Stop the container (if it is running):
docker stop microsocks
- Remove the container:
docker rm microsocks
- Create/start the container using the
docker run
command, by adjusting parameters as needed.
Here is an example of a docker-compose.yml
file that can be used with
Docker Compose.
Make sure to adjust according to your needs. Note that only mandatory network ports are part of the example.
version: '3'
services:
microsocks:
image: shawly/microsocks
restart: unless-stopped
environment:
- TZ: Europe/Berlin
ports:
- "1080:1080"
If the system on which the container runs doesn't provide a way to easily update the Docker image, the following steps can be followed:
- Fetch the latest image:
docker pull shawly/microsocks
- Stop the container:
docker stop microsocks
- Remove the container:
docker rm microsocks
- Start the container using the
docker run
command.
Having troubles with the container or have questions? Please create a new issue.