Skip to content

Commit

Permalink
Merge pull request #1593 from Agoric/mfig/upgrade-to-buster
Browse files Browse the repository at this point in the history
fix: upgrade Docker images to Debian buster
  • Loading branch information
michaelfig authored Aug 23, 2020
2 parents 5a01217 + 2e8c0a9 commit 8a81365
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 16 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,18 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
snapshot: true
tags: latest

docker-vagrant:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build setup image
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: agoric/vagrant-debian
dockerfile: vagrant/Dockerfile
context: vagrant
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
snapshot: true
tags: latest
6 changes: 3 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

TERRAFORM_VERSION = "0.11.14"
NODE_VERSION = "12.x"
GO_VERSION = "1.13.4"
GO_VERSION = "1.14.3"
#DOCKER_VERSION = "=17.09.0~ce-0~debian"
DOCKER_VERSION = ""

Expand Down Expand Up @@ -107,7 +107,7 @@ def get_ipaddr(hostname, default)
end

Vagrant.configure("2") do |config|
config.vm.box = "debian/contrib-stretch64"
config.vm.box = "debian/contrib-buster64"
config.vm.hostname = "agoric-sdk"

private_network_ip = get_ipaddr(config.vm.hostname, "10.10.10.10")
Expand All @@ -129,7 +129,7 @@ Vagrant.configure("2") do |config|
config.vm.provider :docker do |docker, override|
override.vm.box = nil
docker.build_dir = "vagrant"
docker.build_args = ['-t', 'agoric/agoric-sdk:local']
docker.build_args = ['-t', 'agoric/vagrant-debian:latest']
docker.name = "agoric-sdk-docker"
docker.ports = ['127.0.0.1:8000:8000', '127.0.0.1:9229:9229']
docker.remains_running = true
Expand Down
2 changes: 1 addition & 1 deletion packages/agoric-cli/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:stretch
FROM debian:buster
# MAINTAINER Tasos Latsas "tlatsas@kodama.gr"
LABEL maintainer="mfig@agoric.com"

Expand Down
2 changes: 1 addition & 1 deletion packages/cosmic-swingset/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The Golang build container.
# TODO This should be split out into the cosmos-connector.
FROM golang:1.14-stretch
FROM golang:1.14-buster

WORKDIR /usr/src/app
COPY go.mod go.sum ./
Expand Down
4 changes: 2 additions & 2 deletions packages/cosmic-swingset/provisioning-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:stretch AS build
FROM debian:buster AS build

RUN apt-get update -y && apt-get install gcc python3 python3-venv python3-dev -y && apt-get clean -y

Expand All @@ -9,7 +9,7 @@ RUN ve3/bin/pip install wheel
COPY . provisioning-server/
RUN ve3/bin/pip install provisioning-server/

FROM debian:stretch AS install
FROM debian:buster AS install

WORKDIR /usr/src/app
RUN apt-get update -y && apt-get install python3 -y && apt-get clean -y
Expand Down
2 changes: 1 addition & 1 deletion packages/deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG TAG=latest
ARG REPO=agoric/agoric-sdk
FROM golang:stretch AS go-build
FROM golang:buster AS go-build

WORKDIR /usr/src/journalbeat
RUN apt-get update -y && apt-get install -y libsystemd-dev
Expand Down
4 changes: 2 additions & 2 deletions packages/deployment/Dockerfile.sdk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG REPO=agoric/cosmic-swingset
FROM $REPO:$SWINGSET_TAG as cosmic-swingset-go

# The js build container
FROM node:lts-stretch AS build-js
FROM node:lts-buster AS build-js

WORKDIR /usr/src/agoric-sdk
COPY . .
Expand All @@ -18,7 +18,7 @@ RUN cd packages/cosmic-swingset && yarn build:gyp
RUN yarn build

# The install container.
FROM node:lts-stretch AS install
FROM node:lts-buster AS install

# Install some conveniences.
RUN apt-get update && apt-get install -y vim jq less && apt-get clean -y
Expand Down
10 changes: 8 additions & 2 deletions packages/deployment/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ docker-show-fat:
docker build --file=Dockerfile.show-fat ../..

docker-build: docker-build-base docker-build-sdk docker-build-solo \
docker-build-pserver docker-build-setup
docker-build-pserver docker-build-setup docker-build-vagrant

docker-build-sdk:
docker build -t $(REPOSITORY_SDK):latest --file=Dockerfile.sdk ../..
Expand All @@ -31,8 +31,11 @@ docker-build-pserver:
docker-build-solo:
docker build -t $(REPOSITORY)-solo:latest $(SS)lib/ag-solo

docker-build-vagrant:
docker build -t agoric/vagrant-debian:latest --file=../../vagrant/Dockerfile ../../vagrant

docker-push: docker-push-base docker-push-solo docker-push-setup \
docker-push-pserver docker-push-ibc-alpha
docker-push-pserver docker-push-ibc-alpha docker-push-vagrant

# ./docker is an emptyish directory.
docker-build-ibc-alpha:
Expand Down Expand Up @@ -60,3 +63,6 @@ docker-push-solo:
docker tag $(REPOSITORY)-solo:latest $(REPOSITORY)-solo:$(TAG)
$(DONT_PUSH_LATEST) docker push $(REPOSITORY)-solo:latest
docker push $(REPOSITORY)-solo:$(TAG)

docker-push-vagrant:
$(DONT_PUSH_LATEST) docker push agoric/vagrant-debian:latest
2 changes: 1 addition & 1 deletion packages/deployment/terraform/digitalocean/cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ resource "digitalocean_ssh_key" "cluster" {

resource "digitalocean_droplet" "cluster" {
name = "${var.name}-node${var.offset + count.index}"
image = "debian-9-x64"
image = "debian-10-x64"
size = "${var.instance_size}"
region = "${element(var.regions, count.index)}"
ssh_keys = ["${digitalocean_ssh_key.cluster.id}"]
Expand Down
2 changes: 1 addition & 1 deletion packages/deployment/terraform/docker/cluster/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resource "docker_container" "cluster" {
name = "${var.name}-node${var.offset + count.index}"
count = "${var.servers}"
image = "agoric/cosmos-validator:local"
image = "agoric/vagrant-debian:latest"

tmpfs {
"/tmp" = "exec"
Expand Down
4 changes: 2 additions & 2 deletions vagrant/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM debian:stretch
FROM debian:buster
# MAINTAINER Tasos Latsas "tlatsas@kodama.gr"
LABEL maintainer="mfig@agoric.com"

RUN apt-get update \
&& apt-get install -y init openssh-server sudo curl python python3-venv python3-dev \
&& apt-get install -y init openssh-server sudo curl python python3-venv python3-dev vim jq less \
&& apt-get clean

RUN useradd --create-home --shell /bin/bash vagrant
Expand Down

0 comments on commit 8a81365

Please sign in to comment.