Skip to content

Commit

Permalink
Update Docker base image
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-lerch committed Oct 27, 2023
1 parent a5a997f commit f32c5da
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1-alpine3.17 AS build-env
FROM golang:1-alpine3.18 AS build-env
WORKDIR /app

# Copy go.mod and go.sum and download as distinct layers
Expand All @@ -10,7 +10,7 @@ COPY . ./
RUN go build -o /app/dyndns-distributor

# Build runtime image
FROM alpine:3.17
FROM alpine:3.18
WORKDIR /app
ENV GIN_MODE=release
COPY --from=build-env /app/dyndns-distributor .
Expand Down
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"io/ioutil"
"io"
"net"
"net/http"
"net/url"
Expand Down Expand Up @@ -39,7 +39,7 @@ func (c *DynClient) Update(urlTemplate string, ip net.IP) (string, string, error
}

defer response.Body.Close()
body, err := ioutil.ReadAll(response.Body)
body, err := io.ReadAll(response.Body)
if err != nil {
return "", urlWithoutPassword, err
}
Expand All @@ -59,7 +59,7 @@ func (c *DynClient) GetExternalIp(ipRetrieveUrl string) (net.IP, error) {
}

defer response.Body.Close()
body, err := ioutil.ReadAll(response.Body)
body, err := io.ReadAll(response.Body)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"encoding/json"
"io/ioutil"
"io"
"os"
)

Expand All @@ -26,7 +26,7 @@ func LoadSettings() (*Settings, error) {
if err != nil {
return settings, err
} else {
buffer, err := ioutil.ReadAll(file)
buffer, err := io.ReadAll(file)
if err != nil {
return settings, err
} else {
Expand Down

0 comments on commit f32c5da

Please sign in to comment.