Skip to content

Commit 0ce0b64

Browse files
committed
readme update
1 parent 33879dd commit 0ce0b64

File tree

3 files changed

+32
-7
lines changed

3 files changed

+32
-7
lines changed

.github/docker-images/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN mkdir -p /root/aws-iot-securetunneling-localproxy/build \
1313

1414
FROM ${OS} AS minimum_size
1515

16-
COPY --from=deploy /root/aws-iot-securetunneling-localproxy/build/bin/localproxy ./localproxy
16+
COPY --from=deploy /root/aws-iot-securetunneling-localproxy/build/bin/localproxy /root/bin/localproxy
1717

1818
COPY ./.github/docker-images/oss-compliance /root/oss-compliance
1919
RUN HOME_DIR=/root \
@@ -23,4 +23,4 @@ RUN HOME_DIR=/root \
2323
&& bash ${HOME_DIR}/oss-compliance/generate-oss-compliance.sh ${HOME_DIR} \
2424
&& rm -rf ${HOME_DIR}/oss-compliance*
2525

26-
ENTRYPOINT ["/localproxy"]
26+
ENTRYPOINT ["/root/bin"]

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
3030

3131
# Configure Compiler flags
3232
if (UNIX OR APPLE)
33-
set(CUSTOM_COMPILER_FLAGS "-O2 -D_FORTIFY_SOURCE=2 -fPIE -Wall -Werror")
33+
set(CUSTOM_COMPILER_FLAGS "-O2 -D_FORTIFY_SOURCE=2 -fPIE -fstack-protector-strong -Wall -Werror")
3434
set(TEST_COMPILER_FLAGS "${CUSTOM_COMPILER_FLAGS} -D_AWSIOT_TUNNELING_NO_SSL")
3535
elseif (WIN32 OR MSVC)
3636
set(CUSTOM_COMPILER_FLAGS "/W4 /DYNAMICBASE /NXCOMPAT /analyze")

README.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,37 @@ This code enables tunneling of a single threaded TCP client / server socket inte
1818

1919
* Docker 18+
2020

21-
### Running the Docker Build
21+
### Using Pre-built Docker Images
2222

23-
`./docker-build.sh`
23+
We provide several docker images on various platforms.
24+
There are two types of images: base images and release images.
25+
The base images come with all dependencies pre-installed. You will still need to download and build the source.
26+
These are useful if you want to modify and [compile](https://github.com/aws-samples/aws-iot-securetunneling-localproxy#download-and-build-the-local-proxy) the local proxy on your own, but are large (~1 GB each).
27+
You can find them at:
28+
#### https://gallery.ecr.aws/aws-iot-securetunneling-localproxy/base-images
29+
The release images are minimum size images that include a pre-built binary. No dependencies are installed, so recompilation will not work.
30+
The format of every tag is `[arch]-[os]-[git commit sha]` for example: amd64-ubuntu-33879dd7f1500f7b3e56e48ce8b002cd9b0f9e4e.
31+
You can cross-check the git commit sha with the commits in the local proxy repo to see if the binary contains changes added in a specific commit.
32+
You can find them at:
33+
#### https://gallery.ecr.aws/aws-iot-securetunneling-localproxy/release-images
34+
35+
### Building a Docker Image
36+
37+
If you do not want to use the prebuilt images, you can build them yourself:
38+
39+
`cd .github/docker-images/base-images/<os of choice>`
40+
41+
`docker build -t <your tag> .`
2442

25-
After the Docker build completes, run `./docker-run.sh` to open a shell inside the container created in the
26-
previous step, or you can run `./docker-run.sh -p <port_number>` to expose a port from the docker container. Here you can find both the `localproxy` and `localproxytest` binaries. Note that when the localproxy runs in source mode, it binds by default to `localhost`, If you want to access the localproxy from outside the container, make sure to use the option `-b 0.0.0.0` when you run the localproxy from the container so that it binds to `0.0.0.0` since `localhost` can not be access from outside the container.
43+
To build cross-platform images for ARM:
44+
45+
`docker buildx --platform linux/arm64 -t <your tag> .`
46+
47+
After the Docker build completes, run `docker run --rm -it <tag>` to open a shell inside the container created in the
48+
previous step, or you can add ` -p <port_number>` to expose a port from the docker container. Note that when the localproxy runs in source mode, it binds by default to `localhost`, If you want to access the localproxy from outside the container, make sure to use the option `-b 0.0.0.0` when you run the localproxy from the container so that it binds to `0.0.0.0` since `localhost` can not be access from outside the container.
49+
50+
#### Deprecated Method
51+
`./docker-build.sh`
2752

2853
---
2954

0 commit comments

Comments
 (0)