I get an error when deploying docker template in rasberry pi (coder in docker)

I get this error
Error: process "/bin/sh -c apt-get update \t&& apt-get install -y \tcurl \tgit \tgolang \tsudo \tvim \twget \t&& rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 1

on main.tf line 164, in resource "docker_image" "main":
164: resource "docker_image" "main" {
Error: process "/bin/sh -c apt-get update \t&& apt-get install -y \tcurl \tgit \tgolang \tsudo \tvim \twget \t&& rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 1

on main.tf line 164, in resource "docker_image" "main":
164: resource "docker_image" "main" {
was i supposed to do something? all i did was start up coder make an account edit the names of template deploy it
8 Replies
Codercord
Codercord5mo ago
<#1264341278846484581>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Phorcys
Phorcys5mo ago
hey, can you send your template ?
EnderRobber101
EnderRobber101OP5mo ago
I just clicked continue for everything
Phorcys
Phorcys5mo ago
does your environment require a proxy to access the internet ? are you maybe in a country that has locks on a lot of websites ?
EnderRobber101
EnderRobber101OP5mo ago
I might have an error with how i set up coder in docker.
version: "3.9"
services:
coder:
# This MUST be stable for our documentation and
# other automations.
image: ghcr.io/coder/coder:${CODER_VERSION:-latest}
ports:
- "7080:7080"
environment:
CODER_PG_CONNECTION_URL: "postgresql://${POSTGRES_USER:-username}:${POSTGRES_PASSWORD:-password}@database/${POSTGRES_DB:-coder}?sslmode=disable"
CODER_HTTP_ADDRESS: "0.0.0.0:7080"
# You'll need to set CODER_ACCESS_URL to an IP or domain
# that workspaces can reach. This cannot be localhost
# or 127.0.0.1 for non-Docker templates!
CODER_ACCESS_URL: "${CODER_ACCESS_URL}"
# If the coder user does not have write permissions on
# the docker socket, you can uncomment the following
# lines and set the group ID to one that has write
# permissions on the docker socxket.
group_add:
- "991" # docker group on host
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
database:
condition: service_healthy
restart: unless-stopped
database:
# Minimum supported version is 13.
# More versions here: https://hub.docker.com/_/postgres
image: "postgres:16"
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER:-username} # The PostgreSQL user (useful to connect to the database)
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password} # The PostgreSQL password (useful to connect to the database)
POSTGRES_DB: ${POSTGRES_DB:-coder} # The PostgreSQL default database (automatically created at first launch)
volumes:
- coder_data:/var/lib/postgresql/data # Use "docker volume rm coder_coder_data" to reset Coder
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USER:-username} -d ${POSTGRES_DB:-coder}",
]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
coder_data:
version: "3.9"
services:
coder:
# This MUST be stable for our documentation and
# other automations.
image: ghcr.io/coder/coder:${CODER_VERSION:-latest}
ports:
- "7080:7080"
environment:
CODER_PG_CONNECTION_URL: "postgresql://${POSTGRES_USER:-username}:${POSTGRES_PASSWORD:-password}@database/${POSTGRES_DB:-coder}?sslmode=disable"
CODER_HTTP_ADDRESS: "0.0.0.0:7080"
# You'll need to set CODER_ACCESS_URL to an IP or domain
# that workspaces can reach. This cannot be localhost
# or 127.0.0.1 for non-Docker templates!
CODER_ACCESS_URL: "${CODER_ACCESS_URL}"
# If the coder user does not have write permissions on
# the docker socket, you can uncomment the following
# lines and set the group ID to one that has write
# permissions on the docker socxket.
group_add:
- "991" # docker group on host
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
database:
condition: service_healthy
restart: unless-stopped
database:
# Minimum supported version is 13.
# More versions here: https://hub.docker.com/_/postgres
image: "postgres:16"
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER:-username} # The PostgreSQL user (useful to connect to the database)
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password} # The PostgreSQL password (useful to connect to the database)
POSTGRES_DB: ${POSTGRES_DB:-coder} # The PostgreSQL default database (automatically created at first launch)
volumes:
- coder_data:/var/lib/postgresql/data # Use "docker volume rm coder_coder_data" to reset Coder
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USER:-username} -d ${POSTGRES_DB:-coder}",
]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
coder_data:
does this look right no
EnderRobber101
EnderRobber101OP5mo ago
FROM ubuntu

RUN apt-get update \
&& apt-get install -y \
curl \
git \
golang \
sudo \
vim \
wget \
&& rm -rf /var/lib/apt/lists/*

ARG USER=coder
RUN useradd --groups sudo --no-create-home --shell /bin/bash ${USER} \
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \
&& chmod 0440 /etc/sudoers.d/${USER}
USER ${USER}
WORKDIR /home/${USER}
FROM ubuntu

RUN apt-get update \
&& apt-get install -y \
curl \
git \
golang \
sudo \
vim \
wget \
&& rm -rf /var/lib/apt/lists/*

ARG USER=coder
RUN useradd --groups sudo --no-create-home --shell /bin/bash ${USER} \
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \
&& chmod 0440 /etc/sudoers.d/${USER}
USER ${USER}
WORKDIR /home/${USER}
EnderRobber101
EnderRobber101OP5mo ago
I can just use codeserver for my use case
Codercord
Codercord5mo ago
@EnderRobber101 closed the thread.
Want results from more Discord servers?
Add your server