-
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1,106 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
config/ | ||
manifest-tool* | ||
qemu-*-static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Authors | ||
|
||
Justin J. Novack <jnovack@gmail.com> (@jnovack) | ||
- [Justin J. Novack](https://github.com/jnovack) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# jnovack/autossh | ||
|
||
## v2.0.0 | ||
|
||
### Breaking Changes in v2.0.0 | ||
|
||
A number of breaking changes were made which requried a version bump. | ||
|
||
- Renamed lots of confusing variables names to less confusing variable names | ||
- `SSH_TUNNEL_HOST` to `SSH_TARGET_HOST` | ||
- `SSH_TUNNEL_LOCAL` to `SSH_TARGET_PORT` | ||
- `SSH_TUNNEL_REMOTE` to `SSH_TUNNEL_PORT` | ||
- `SSH_HOSTUSER` to `SSH_REMOTE_USER` | ||
- `SSH_HOSTNAME` to `SSH_REMOTE_HOST` | ||
- `SSH_HOSTPORT` to `SSH_REMOTE_PORT` | ||
- `SERVER_ALIVE_INTERVAL` to `SSH_SERVER_ALIVE_INTERVAL` | ||
- `SERVER_ALIVE_COUNT_MAX` to `SSH_SERVER_ALIVE_COUNT_MAX` | ||
|
||
- Docker Swarm compatibility | ||
- Renamed `SSH_KNOWN_HOSTS` to `SSH_KNOWN_HOSTS_FILE` | ||
|
||
## v1.2.0 | ||
|
||
- Image is now runnable as non-root user | ||
- Allowed `autossh` variables to be configurable | ||
- `AUTOSSH_PIDFILE` | ||
- `AUTOSSH_POLL` | ||
- `AUTOSSH_GATETIME` | ||
- `AUTOSSH_FIRST_POLL` | ||
- `AUTOSSH_LOGLEVEL` | ||
- `AUTOSSH_LOGFILE` | ||
- Allowed `ssh` variables to be configurable | ||
- `SERVER_ALIVE_INTERVAL` | ||
- `SERVER_ALIVE_COUNT_MAX` | ||
|
||
## v1.0.0 | ||
|
||
- Actually works |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
# Contributors | ||
|
||
* [@ccremer](https://github.com/ccremer) | ||
* Lukas Plevac <LukasPlevac@gmail.com> | ||
- [@ccremer](https://github.com/ccremer) | ||
- [Christian Gahlert](https://github.com/chrisgahlert) | ||
- [Jan Piskvor Martinec](https://github.com/Piskvor) | ||
- [Lukas Plevac](https://github.com/Lukas0025) | ||
- [Shyam Sunder](https://github.com/sgsunder) | ||
|
||
## Special Thanks | ||
|
||
- [Alexandre Fayolle](https://github.com/gurneyalex) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
FROM arm32v6/alpine:latest | ||
|
||
# Copy downloaded architecture emulation static binary | ||
COPY qemu-arm-static /usr/bin/ | ||
|
||
ARG APPLICATION="myapp" | ||
ARG BUILD_RFC3339="1970-01-01T00:00:00Z" | ||
ARG REVISION="local" | ||
ARG DESCRIPTION="no description" | ||
ARG PACKAGE="user/repo" | ||
ARG VERSION="dirty" | ||
|
||
LABEL org.opencontainers.image.ref.name="${PACKAGE}" \ | ||
org.opencontainers.image.created=$BUILD_RFC3339 \ | ||
org.opencontainers.image.authors="Justin J. Novack <jnovack@gmail.com>" \ | ||
org.opencontainers.image.documentation="https://github.com/${PACKAGE}/README.md" \ | ||
org.opencontainers.image.description="${DESCRIPTION}" \ | ||
org.opencontainers.image.licenses="MIT" \ | ||
org.opencontainers.image.source="https://github.com/${PACKAGE}" \ | ||
org.opencontainers.image.revision=$REVISION \ | ||
org.opencontainers.image.version=$VERSION \ | ||
org.opencontainers.image.url="https://hub.docker.com/r/${PACKAGE}/" | ||
|
||
RUN \ | ||
apk --no-cache add \ | ||
autossh \ | ||
dumb-init && \ | ||
chmod g+w /etc/passwd | ||
|
||
ENV \ | ||
AUTOSSH_PIDFILE=/tmp/autossh.pid \ | ||
AUTOSSH_POLL=30 \ | ||
AUTOSSH_GATETIME=30 \ | ||
AUTOSSH_FIRST_POLL=30 \ | ||
AUTOSSH_LOGLEVEL=0 \ | ||
AUTOSSH_LOGFILE=/dev/stdout | ||
|
||
ENV \ | ||
APPLICATION="${APPLICATION}" \ | ||
BUILD_RFC3339="${BUILD_RFC3339}" \ | ||
REVISION="${REVISION}" \ | ||
DESCRIPTION="${DESCRIPTION}" \ | ||
PACKAGE="${PACKAGE}" \ | ||
VERSION="${VERSION}" | ||
|
||
COPY ./rootfs/entrypoint.sh /entrypoint.sh | ||
COPY ./rootfs/version.sh /version.sh | ||
|
||
ENTRYPOINT [ "/entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
FROM arm64v8/alpine:latest | ||
|
||
# Copy downloaded architecture emulation static binary | ||
COPY qemu-aarch64-static /usr/bin/ | ||
|
||
ARG APPLICATION="myapp" | ||
ARG BUILD_RFC3339="1970-01-01T00:00:00Z" | ||
ARG REVISION="local" | ||
ARG DESCRIPTION="no description" | ||
ARG PACKAGE="user/repo" | ||
ARG VERSION="dirty" | ||
|
||
LABEL org.opencontainers.image.ref.name="${PACKAGE}" \ | ||
org.opencontainers.image.created=$BUILD_RFC3339 \ | ||
org.opencontainers.image.authors="Justin J. Novack <jnovack@gmail.com>" \ | ||
org.opencontainers.image.documentation="https://github.com/${PACKAGE}/README.md" \ | ||
org.opencontainers.image.description="${DESCRIPTION}" \ | ||
org.opencontainers.image.licenses="MIT" \ | ||
org.opencontainers.image.source="https://github.com/${PACKAGE}" \ | ||
org.opencontainers.image.revision=$REVISION \ | ||
org.opencontainers.image.version=$VERSION \ | ||
org.opencontainers.image.url="https://hub.docker.com/r/${PACKAGE}/" | ||
|
||
RUN \ | ||
apk --no-cache add \ | ||
autossh \ | ||
dumb-init && \ | ||
chmod g+w /etc/passwd | ||
|
||
ENV \ | ||
AUTOSSH_PIDFILE=/tmp/autossh.pid \ | ||
AUTOSSH_POLL=30 \ | ||
AUTOSSH_GATETIME=30 \ | ||
AUTOSSH_FIRST_POLL=30 \ | ||
AUTOSSH_LOGLEVEL=0 \ | ||
AUTOSSH_LOGFILE=/dev/stdout | ||
|
||
ENV \ | ||
APPLICATION="${APPLICATION}" \ | ||
BUILD_RFC3339="${BUILD_RFC3339}" \ | ||
REVISION="${REVISION}" \ | ||
DESCRIPTION="${DESCRIPTION}" \ | ||
PACKAGE="${PACKAGE}" \ | ||
VERSION="${VERSION}" | ||
|
||
COPY ./rootfs/entrypoint.sh /entrypoint.sh | ||
COPY ./rootfs/version.sh /version.sh | ||
|
||
ENTRYPOINT [ "/entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,24 @@ | ||
.PHONY: build | ||
include variables.mk | ||
|
||
build: | ||
IMAGE_NAME=jnovack/autossh:dev hooks/build | ||
.PHONY: build all | ||
.DEFAULT_GOAL := all | ||
|
||
clean: | ||
docker rmi jnovack/autossh:dev | ||
all: build | ||
|
||
test: | ||
echo $(PACKAGE) | ||
|
||
docker-nuke: | ||
docker-compose -f docker-compose.test.yml down --rmi all --remove-orphans -v | ||
|
||
docker-clean: | ||
docker-compose -f docker-compose.test.yml down --remove-orphans -v | ||
|
||
docker-down: | ||
docker-compose -f docker-compose.test.yml down | ||
|
||
docker-up: | ||
docker-compose -f docker-compose.test.yml up | ||
|
||
docker-test: | ||
docker-compose -f docker-compose.test.yml up --exit-code-from sut |
Oops, something went wrong.