Skip to content

Commit 0c4cd39

Browse files
committed
Update the dockerfile and format main.go
1 parent b09dc18 commit 0c4cd39

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

dev/docker-compose-gox.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# export BUILD_VERSION=v0.1.0
2-
# export BUILD_DATE=2016-02-15T12:00:00+0900
3-
# docker-compose -f dev/docker-compose-gox.yml run --rm build
1+
# BUILD_VERSION=v0.1.0 BUILD_DATE=`date +%FT%T%z` docker-compose -f development/docker-compose-gox.yml run --rm build
42

53
build:
64
image: pottava/gox:go1.8

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@ services:
2222
- SSL_CERT_PATH
2323
- SSL_KEY_PATH
2424
- ACCESS_LOG=true
25-
- GO15VENDOREXPERIMENT=1
2625
container_name: app

main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ func awss3(w http.ResponseWriter, r *http.Request) {
221221
}
222222

223223
func s3get(backet, key string) (*s3.GetObjectOutput, error) {
224-
sess, err := session.NewSession(&aws.Config{Region: aws.String(c.awsRegion)})
225-
if err != nil {
226-
log.Printf("[service] unable to create aws session: %s", err)
227-
}
224+
sess, err := session.NewSession(&aws.Config{Region: aws.String(c.awsRegion)})
225+
if err != nil {
226+
log.Printf("[service] unable to create aws session: %s", err)
227+
}
228228
req := &s3.GetObjectInput{
229229
Bucket: aws.String(backet),
230230
Key: aws.String(key),

prod/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ RUN apk --no-cache add --virtual build-dependencies bash gcc musl-dev openssl go
2929

3030
# Compile s3-proxy
3131
&& go get -u github.com/pottava/aws-s3-proxy \
32-
&& mv /go/bin/aws-s3-proxy /aws-s3-proxy \
32+
&& mv /go/bin/aws-s3-proxy /usr/bin \
3333

3434
# Clean up
3535
&& apk del --purge build-dependencies \
3636
&& rm -rf /usr/local/go /usr/lib/go /go /golang.tar.gz /*.patch
3737

3838
EXPOSE 80
3939

40-
CMD ["/aws-s3-proxy"]
40+
CMD ["aws-s3-proxy"]

0 commit comments

Comments
 (0)