Skip to content

Commit 01d0c21

Browse files
committed
chore(go-dev): upgrade to golang1.17
1 parent aabde88 commit 01d0c21

2 files changed

Lines changed: 38 additions & 11 deletions

File tree

rootfs/Dockerfile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
1-
FROM docker.io/library/golang:1.16
1+
FROM docker.io/library/golang:1.17
22

33
LABEL name="drycc-go-dev"
44

55
ENV ENVTPL_VERSION=v1.0.0
6-
ENV GOLANGCI_LINT_VERSION=v1.41.1
6+
ENV GOLANGCI_LINT_VERSION=v1.42.1
77

88
# This is a huge one-liner to optimize the Docker image layer.
99
# We disable source repos to speed up apt-get update.
1010
RUN export DEBIAN_FRONTEND=noninteractive \
11-
# podman source list
12-
&& echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list \
13-
&& echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list \
14-
&& curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/Release.key | apt-key add - \
15-
&& apt-get update \
16-
&& apt-get -y -t buster-backports install libseccomp2 \
17-
&& apt-get install -y podman \
18-
&& sed -i "s|#mount_program = \"/usr/bin/fuse-overlayfs\"|mount_program = \"/usr/bin/fuse-overlayfs\"|g" /etc/containers/storage.conf \
19-
&& apt-get upgrade -y --no-install-recommends \
11+
&& apt-get update -y --no-install-recommends \
2012
&& apt-get install -y --no-install-recommends \
2113
lsb-release \
2214
bash \
@@ -43,6 +35,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \
4335
zip \
4436
shellcheck \
4537
etcd \
38+
podman \
39+
fuse-overlayfs \
4640
&& curl -o /usr/local/bin/kubectl \
4741
-L "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/$(dpkg --print-architecture)/kubectl" \
4842
&& chmod +x /usr/local/bin/kubectl \
@@ -65,6 +59,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \
6559
&& chmod +x /usr/local/bin/pack \
6660
&& rm -rf /tmp/pack \
6761
&& curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin $GOLANGCI_LINT_VERSION \
62+
&& bash -c "mkdir -p /var/lib/shared/{overlay-images,overlay-layers}" \
63+
&& bash -c "touch /var/lib/shared/{overlay-images/images.lock,overlay-layers/layers.lock}" \
6864
&& apt-get autoremove -y \
6965
&& apt-get clean -y \
7066
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc

rootfs/etc/containers/storage.conf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This file is is the configuration file for all tools
2+
# that use the containers/storage library.
3+
# See man 5 containers-storage.conf for more information
4+
# The "container storage" table contains all of the server options.
5+
[storage]
6+
7+
# Default Storage Driver, Must be set for proper operation.
8+
driver = "overlay"
9+
10+
# Temporary storage location
11+
runroot = "/run/containers/storage"
12+
13+
# Primary Read/Write location of container storage
14+
graphroot = "/var/lib/containers/storage"
15+
16+
# Storage path for rootless users
17+
#
18+
# rootless_storage_path = "$HOME/.local/share/containers/storage"
19+
20+
[storage.options]
21+
# Storage options to be passed to underlying storage drivers
22+
23+
# AdditionalImageStores is used to pass paths to additional Read/Only image stores
24+
# Must be comma separated list.
25+
additionalimagestores = [
26+
"/var/lib/shared",
27+
]
28+
29+
[storage.options.overlay]
30+
mount_program = "/usr/bin/fuse-overlayfs"
31+
mountopt = "nodev,fsync=0"

0 commit comments

Comments
 (0)