Skip to content

Commit

Permalink
add netstat to devel; document devel image
Browse files Browse the repository at this point in the history
  • Loading branch information
egladman committed May 1, 2022
1 parent 8bac6f3 commit 2484c78
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ RUN set -eux; \
curl \
ca-certificates \
unzip \
net-tools \
; \
rm -rf /var/lib/apt/lists/*

Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ DOCKER := docker
SED := sed
GIT := git

DOCKER_BUILD_FLAGS :=
IMAGE_VARIANT := core # core | devel

DOCKER_BUILD_FLAGS := --build-arg VARIANT=$(IMAGE_VARIANT)

SPACE=$() $()
COMMA=,
Expand All @@ -14,7 +16,7 @@ GIT_BRANCH := $(shell $(GIT) rev-parse --abbrev-ref HEAD | $(SED) 's/[^a-zA-Z0-9
GIT_HASH := $(shell $(GIT) rev-parse HEAD)

override TAGS += branch-$(GIT_BRANCH) \
git-$(GIT_HASH)
git-$(GIT_HASH)

# Tag image with 'latest' by default
ifeq ($(TAG_LATEST),true)
Expand All @@ -24,19 +26,20 @@ endif
# Auto enable buildx when available
BUILDX_ENABLED := $(shell docker buildx version > /dev/null 2>&1 && printf true || printf false)
BUILDX_PLATFORMS := linux/amd64 linux/arm64
BUILDX_FLAGS :=

ifdef REPOSITORY_PREFIX
override REPOSITORY := $(REPOSITORY_PREFIX)/$(REPOSITORY)
endif

ifdef TAGS
TAG_PREFIX := --tag $(REPOSITORY):
TAG_PREFIX := --tag $(REPOSITORY):
override DOCKER_BUILD_FLAGS += $(TAG_PREFIX)$(subst $(SPACE),$(SPACE)$(TAG_PREFIX),$(strip $(TAGS)))
endif

ifeq ($(BUILDX_ENABLED),true)
override DOCKER := $(DOCKER) buildx
override DOCKER_BUILD_FLAGS += --platform $(subst $(SPACE),$(COMMA),$(BUILDX_PLATFORMS))
override DOCKER := $(DOCKER) buildx
override DOCKER_BUILD_FLAGS += --platform $(subst $(SPACE),$(COMMA),$(BUILDX_PLATFORMS))
endif

$(info Docker buildx enabled: $(BUILDX_ENABLED))
Expand All @@ -46,9 +49,6 @@ $(info Docker buildx enabled: $(BUILDX_ENABLED))
image:
$(DOCKER) build . $(DOCKER_BUILD_FLAGS)

image-devel:
$(DOCKER) build . $(DOCKER_BUILD_FLAGS) --build-arg VARIANT=devel

image-push:
ifeq ($(BUILDX_ENABLED),true)
$(MAKE) image DOCKER_BUILD_FLAGS+="--push"
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,22 @@ make image
```

### Advanced
Create image `openvpn-ivpn`

1. Create image `openvpn-ivpn`

- Skip checksum validation
- Do not use cache when building image

```
make image DOCKER_BUILD_FLAGS="--no-cache --build-arg SKIP_CHECKSUM=1"
```

2. Create devel image `openvpn-ivpn`

```
make image IMAGE_VARIANT=devel
```

## Run

1. Determine which openvpn config to use. You can list all available `.ovpn`
Expand Down

0 comments on commit 2484c78

Please sign in to comment.