Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Commit 5e7f5bd

Browse files
authored
Merge pull request #6 from hypnoglow/actualize-1
Actualize, part 1
2 parents 2ac4458 + 3ab396d commit 5e7f5bd

File tree

9 files changed

+58
-172
lines changed

9 files changed

+58
-172
lines changed

.tool-versions

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
golang 1.20.8

Makefile

+11
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
.PHONY: all
17+
all: deps test
18+
19+
.PHONY: deps
20+
deps:
21+
go mod tidy
22+
23+
.PHONY: test
24+
test:
25+
go test -v ./...
26+
1627
.PHONY: images
1728
images:
1829
docker build -f docker/scratch/Dockerfile -t hypnoglow/envexec:latest-scratch .

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ The easiest way to embed **envexec** into your Docker image is to just
2323
copy the binary from the prebuilt image:
2424

2525
```docker
26-
FROM alpine:3.8
26+
FROM alpine:3.18
2727
2828
COPY --from=hypnoglow/envexec:latest-scratch /envexec /usr/local/bin/envexec
2929
3030
ENTRYPOINT ["envexec", "--"]
31-
CMD ["echo", "Hello from evnexec!"]
31+
CMD ["echo", "Hello from envexec!"]
3232
```
3333

3434
An alternative approach is to build your image with **envexec** image
@@ -38,7 +38,7 @@ as a base:
3838
FROM hypnoglow/envexec:latest-alpine
3939
4040
ENTRYPOINT ["envexec", "--"]
41-
CMD ["echo", "Hello from evnexec!"]
41+
CMD ["echo", "Hello from envexec!"]
4242
```
4343

4444
*NOTE: Using "latest" tags is not recommended. Prefer tagged versions.*

_examples/docker/copy/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM alpine:3.8
1+
FROM alpine:3.18
22

33
# NOTE: Using "latest" tags is not recommended. Prefer tagged versions.
44
COPY --from=hypnoglow/envexec:latest-scratch /envexec /usr/local/bin/envexec
55

66
ENTRYPOINT ["envexec", "--"]
7-
CMD ["echo", "Hello from evnexec!"]
7+
CMD ["echo", "Hello from envexec!"]

codefresh.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@ stages:
1010
- release
1111

1212
steps:
13+
clone:
14+
title: Cloning repository...
15+
type: git-clone
16+
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
17+
revision: '${{CF_REVISION}}'
18+
1319
install_modules:
1420
stage: deps
1521
title: Install modules
16-
image: golang:1.11.4-alpine
22+
image: golang:1.20-alpine
1723
commands:
1824
- apk add --no-cache git
1925
- echo "--> Download modules ..."
@@ -30,7 +36,7 @@ steps:
3036
run_tests:
3137
stage: test
3238
title: Run tests
33-
image: golang:1.11.4-alpine
39+
image: golang:1.20-alpine
3440
commands:
3541
- echo "--> Run tests ..."
3642
- GOFLAGS=-mod=vendor CGO_ENABLED=0 go test -v ./...
@@ -47,12 +53,14 @@ steps:
4753
title: Build image (scratch)
4854
type: build
4955
dockerfile: docker/scratch/Dockerfile
56+
registry: dockerhub
5057
image-name: hypnoglow/envexec
5158
tag: commit-${{CF_SHORT_REVISION}}-scratch
5259
build_image_alpine:
5360
title: Build image (alpine)
5461
type: build
5562
dockerfile: docker/alpine/Dockerfile
63+
registry: dockerhub
5664
image-name: hypnoglow/envexec
5765
tag: commit-${{CF_SHORT_REVISION}}-alpine
5866
when:
@@ -113,7 +121,7 @@ steps:
113121
release_on_github:
114122
stage: release
115123
title: Create GitHub release
116-
image: golang:1.11.4-alpine
124+
image: golang:1.20-alpine
117125
commands:
118126
- apk add --no-cache curl bash git
119127
- curl -sL https://git.io/goreleaser | bash

docker/alpine/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
FROM golang:1.11.4-alpine3.8 AS build
16+
FROM golang:1.20-alpine3.18 AS build
1717

1818
WORKDIR /opt/envexec/
1919

2020
COPY . .
2121

2222
RUN CGO_ENABLED=0 go build -mod=vendor
2323

24-
FROM alpine:3.8
24+
FROM alpine:3.18
2525

2626
COPY --from=build /opt/envexec/envexec /usr/local/bin/envexec

docker/scratch/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
FROM golang:1.11.4-alpine3.8 AS build
16+
FROM golang:1.20-alpine3.18 AS build
1717

1818
WORKDIR /opt/envexec/
1919

go.mod

+27-49
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
module github.com/hypnoglow/envexec
22

3+
go 1.20
4+
5+
require (
6+
github.com/ghodss/yaml v1.0.0
7+
github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f
8+
github.com/hashicorp/vault v1.0.1
9+
github.com/integrii/flaggy v0.0.0-20181007032133-1056ce330646
10+
github.com/stretchr/testify v1.2.2
11+
)
12+
313
require (
414
contrib.go.opencensus.io/exporter/ocagent v0.4.1 // indirect
515
github.com/Azure/azure-sdk-for-go v23.2.0+incompatible // indirect
@@ -13,14 +23,10 @@ require (
1323
github.com/SAP/go-hdb v0.13.1 // indirect
1424
github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 // indirect
1525
github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20181217080118-5530379788a0 // indirect
16-
github.com/araddon/gou v0.0.0-20180803232539-d7d8174cb8b3 // indirect
1726
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect
1827
github.com/armon/go-radix v1.0.0 // indirect
1928
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf // indirect
2029
github.com/aws/aws-sdk-go v1.16.7 // indirect
21-
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 // indirect
22-
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
23-
github.com/boltdb/bolt v1.3.1 // indirect
2430
github.com/boombuler/barcode v1.0.0 // indirect
2531
github.com/briankassouf/jose v0.9.1 // indirect
2632
github.com/cenkalti/backoff v2.1.0+incompatible // indirect
@@ -29,13 +35,8 @@ require (
2935
github.com/circonus-labs/circonus-gometrics v2.2.5+incompatible // indirect
3036
github.com/circonus-labs/circonusllhist v0.1.3 // indirect
3137
github.com/containerd/continuity v0.0.0-20181203112020-004b46473808 // indirect
32-
github.com/coreos/bbolt v1.3.0 // indirect
33-
github.com/coreos/etcd v3.3.10+incompatible // indirect
3438
github.com/coreos/go-oidc v2.0.0+incompatible // indirect
35-
github.com/coreos/go-semver v0.2.0 // indirect
36-
github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142 // indirect
37-
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
38-
github.com/dancannon/gorethink v4.0.0+incompatible // indirect
39+
github.com/davecgh/go-spew v1.1.1 // indirect
3940
github.com/denisenkom/go-mssqldb v0.0.0-20181014144952-4e0d7dc8888f // indirect
4041
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
4142
github.com/dimchansky/utfbom v1.1.0 // indirect
@@ -47,32 +48,23 @@ require (
4748
github.com/fullsailor/pkcs7 v0.0.0-20180613152042-8306686428a5 // indirect
4849
github.com/gammazero/deque v0.0.0-20180920172122-f6adf94963e4 // indirect
4950
github.com/gammazero/workerpool v0.0.0-20180920155329-48371c973101 // indirect
50-
github.com/garyburd/redigo v1.6.0 // indirect
51-
github.com/ghodss/yaml v1.0.0
5251
github.com/go-errors/errors v1.0.1 // indirect
5352
github.com/go-ldap/ldap v2.5.1+incompatible // indirect
5453
github.com/go-sql-driver/mysql v1.4.1 // indirect
55-
github.com/go-stomp/stomp v2.0.1+incompatible // indirect
5654
github.com/go-test/deep v1.0.1 // indirect
5755
github.com/gocql/gocql v0.0.0-20181124151448-70385f88b28b // indirect
5856
github.com/gogo/protobuf v1.2.0 // indirect
59-
github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff // indirect
57+
github.com/golang/protobuf v1.2.0 // indirect
6058
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect
61-
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c // indirect
6259
github.com/google/go-github v17.0.0+incompatible // indirect
6360
github.com/google/go-querystring v1.0.0 // indirect
6461
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect
6562
github.com/googleapis/gax-go v2.0.2+incompatible // indirect
66-
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
6763
github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75 // indirect
68-
github.com/gorilla/websocket v1.4.0 // indirect
69-
github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect
70-
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect
71-
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
72-
github.com/grpc-ecosystem/grpc-gateway v1.6.2 // indirect
7364
github.com/hashicorp/consul v1.4.0 // indirect
65+
github.com/hashicorp/errwrap v1.0.0 // indirect
66+
github.com/hashicorp/go-cleanhttp v0.5.0 // indirect
7467
github.com/hashicorp/go-gcp-common v0.0.0-20180425173946-763e39302965 // indirect
75-
github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f
7668
github.com/hashicorp/go-immutable-radix v1.0.0 // indirect
7769
github.com/hashicorp/go-memdb v0.0.0-20181108192425-032f93b25bec // indirect
7870
github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c // indirect
@@ -81,13 +73,14 @@ require (
8173
github.com/hashicorp/go-retryablehttp v0.5.0 // indirect
8274
github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 // indirect
8375
github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 // indirect
76+
github.com/hashicorp/go-uuid v1.0.0 // indirect
8477
github.com/hashicorp/go-version v1.0.0 // indirect
78+
github.com/hashicorp/golang-lru v0.5.0 // indirect
8579
github.com/hashicorp/hcl v1.0.0 // indirect
8680
github.com/hashicorp/memberlist v0.1.0 // indirect
8781
github.com/hashicorp/nomad v0.8.6 // indirect
8882
github.com/hashicorp/raft v1.0.0 // indirect
8983
github.com/hashicorp/serf v0.8.1 // indirect
90-
github.com/hashicorp/vault v1.0.1
9184
github.com/hashicorp/vault-plugin-auth-alicloud v0.0.0-20181109180636-f278a59ca3e8 // indirect
9285
github.com/hashicorp/vault-plugin-auth-azure v0.0.0-20181207232528-4c0b46069a22 // indirect
9386
github.com/hashicorp/vault-plugin-auth-centrify v0.0.0-20180816201131-66b0a34a58bf // indirect
@@ -100,76 +93,61 @@ require (
10093
github.com/hashicorp/vault-plugin-secrets-gcp v0.0.0-20180921173200-d6445459e80c // indirect
10194
github.com/hashicorp/vault-plugin-secrets-gcpkms v0.0.0-20181212182553-6cd991800a6d // indirect
10295
github.com/hashicorp/vault-plugin-secrets-kv v0.0.0-20181106190520-2236f141171e // indirect
103-
github.com/integrii/flaggy v0.0.0-20181007032133-1056ce330646
96+
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect
10497
github.com/jeffchao/backoff v0.0.0-20140404060208-9d7fd7aa17f2 // indirect
10598
github.com/jefferai/jsonx v0.0.0-20160721235117-9cc31c3135ee // indirect
106-
github.com/jonboulle/clockwork v0.1.0 // indirect
10799
github.com/json-iterator/go v1.1.5 // indirect
108-
github.com/jtolds/gls v4.2.1+incompatible // indirect
109100
github.com/keybase/go-crypto v0.0.0-20181127160227-255a5089e85a // indirect
101+
github.com/kr/pretty v0.1.0 // indirect
110102
github.com/lib/pq v1.0.0 // indirect
111-
github.com/mattbaird/elastigo v0.0.0-20170123220020-2fe47fd29e4b // indirect
112103
github.com/michaelklishin/rabbit-hole v1.4.0 // indirect
113104
github.com/miekg/dns v1.1.1 // indirect
114105
github.com/mitchellh/copystructure v1.0.0 // indirect
115106
github.com/mitchellh/go-homedir v1.0.0 // indirect
116107
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
117108
github.com/mitchellh/hashstructure v1.0.0 // indirect
118109
github.com/mitchellh/mapstructure v1.1.2 // indirect
110+
github.com/mitchellh/reflectwalk v1.0.0 // indirect
119111
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
120112
github.com/modern-go/reflect2 v1.0.1 // indirect
121-
github.com/onsi/ginkgo v1.7.0 // indirect
122-
github.com/onsi/gomega v1.4.3 // indirect
113+
github.com/oklog/run v1.0.0 // indirect
123114
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
124115
github.com/opencontainers/image-spec v1.0.1 // indirect
125116
github.com/opencontainers/runc v0.1.1 // indirect
126-
github.com/ory-am/common v0.4.0 // indirect
127117
github.com/ory/dockertest v3.3.2+incompatible // indirect
128118
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c // indirect
129119
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
130-
github.com/pborman/uuid v1.2.0 // indirect
131120
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
132121
github.com/pkg/errors v0.8.0 // indirect
122+
github.com/pmezard/go-difflib v1.0.0 // indirect
133123
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
134124
github.com/pquerna/otp v1.0.0 // indirect
135125
github.com/prometheus/client_golang v0.9.2 // indirect
136126
github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735 // indirect
137-
github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec // indirect
138127
github.com/satori/go.uuid v1.2.0 // indirect
139128
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
140129
github.com/sirupsen/logrus v1.2.0 // indirect
141-
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
142-
github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c // indirect
143-
github.com/soheilhy/cmux v0.1.4 // indirect
144-
github.com/spf13/pflag v1.0.3 // indirect
145-
github.com/streadway/amqp v0.0.0-20181205114330-a314942b2fd9 // indirect
146-
github.com/stretchr/testify v1.2.2
147-
github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 // indirect
148130
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 // indirect
149131
github.com/ugorji/go/codec v0.0.0-20181209151446-772ced7fd4c2 // indirect
150-
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 // indirect
151-
go.uber.org/atomic v1.3.2 // indirect
152-
go.uber.org/multierr v1.1.0 // indirect
153-
go.uber.org/zap v1.9.1 // indirect
132+
go.opencensus.io v0.18.1-0.20181204023538-aab39bd6a98b // indirect
154133
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 // indirect
155134
golang.org/x/net v0.0.0-20181217023233-e147a9138326 // indirect
156135
golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890 // indirect
136+
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f // indirect
157137
golang.org/x/sys v0.0.0-20181217223516-dcdaa6325bcb // indirect
138+
golang.org/x/text v0.3.0 // indirect
158139
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c // indirect
159140
google.golang.org/api v0.0.0-20181217000635-41dc4b66e69d // indirect
141+
google.golang.org/appengine v1.1.0 // indirect
142+
google.golang.org/genproto v0.0.0-20180831171423-11092d34479b // indirect
160143
google.golang.org/grpc v1.17.0 // indirect
161144
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
162-
gopkg.in/gorethink/gorethink.v4 v4.1.0 // indirect
163-
gopkg.in/ldap.v2 v2.5.1 // indirect
145+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
164146
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce // indirect
165-
gopkg.in/ory-am/dockertest.v2 v2.2.3 // indirect
166147
gopkg.in/square/go-jose.v2 v2.2.1 // indirect
167-
gopkg.in/vmihailenco/msgpack.v2 v2.9.1 // indirect
168148
gopkg.in/yaml.v2 v2.2.2 // indirect
169-
gotest.tools v2.2.0+incompatible // indirect
170149
k8s.io/api v0.0.0-20181130031204-d04500c8c3dd // indirect
171150
k8s.io/apimachinery v0.0.0-20181215012845-4d029f033399 // indirect
172151
k8s.io/klog v0.1.0 // indirect
173152
layeh.com/radius v0.0.0-20181129000116-83b1b1c7637c // indirect
174-
sigs.k8s.io/yaml v1.1.0 // indirect
175153
)

0 commit comments

Comments
 (0)